Skip to content

make MantleBackup spec.pvc available for field selector#172

Merged
satoru-takeuchi merged 1 commit into
mainfrom
add-selectable-fields
Jul 16, 2025
Merged

make MantleBackup spec.pvc available for field selector#172
satoru-takeuchi merged 1 commit into
mainfrom
add-selectable-fields

Conversation

@cupnes

@cupnes cupnes commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

Add selectableFields of .spec.pvc to the MantleBackup CRD.

Signed-off-by: Yuma Ogami <yuma-ogami@cybozu.co.jp>
@cupnes cupnes requested a review from Copilot July 16, 2025 06:45
@cupnes cupnes marked this pull request as draft July 16, 2025 06:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for using the .spec.pvc field in server-side field selectors for the MantleBackup CRD.

  • Includes the new selectableFields entry in both the base CRD and Helm chart template.
  • Adds a Kubebuilder marker in the Go API type to generate the field selector.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
config/crd/bases/mantle.cybozu.io_mantlebackups.yaml Injects selectableFields: - jsonPath: .spec.pvc into CRD
charts/mantle-cluster-wide/templates/mantle.cybozu.io_mantlebackups.yaml Mirrors the same selectableFields update in chart
api/v1/mantlebackup_types.go Adds //+kubebuilder:selectablefield:JSONPath= marker
Comments suppressed due to low confidence (3)

config/crd/bases/mantle.cybozu.io_mantlebackups.yaml:151

  • [nitpick] Consider adding an integration or e2e test that exercises kubectl get mantlebackups --field-selector spec.pvc=<value> to verify the new field selector functionality.
    selectableFields:

api/v1/mantlebackup_types.go:71

  • The Kubebuilder marker for selectable fields appears incorrect. It should use the plural form and correct syntax, for example: //+kubebuilder:selectableFields:jsonPath=.spec.pvc (without backticks).
//+kubebuilder:selectablefield:JSONPath=`.spec.pvc`

@cupnes cupnes marked this pull request as ready for review July 16, 2025 07:31
@cupnes cupnes requested a review from satoru-takeuchi July 16, 2025 07:31
@satoru-takeuchi satoru-takeuchi merged commit 593f1c4 into main Jul 16, 2025
11 checks passed
@satoru-takeuchi satoru-takeuchi deleted the add-selectable-fields branch July 16, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants