-
Notifications
You must be signed in to change notification settings - Fork 39k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add field selector support to delete, label, annotate #60717
Conversation
@kubernetes/sig-cli-pr-reviews |
@liggitt did you mean label selector or field selector. Is my understanding correct that now you would be able to annotate for e.g. multiple pods which match a label ? |
Field selector. You can already annotate pods which match a label:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to make changes to LabelOptions in pkg/kubectl/cmd/label.go
done |
rebased. @soltysh @juanvallejo PTAL at delete changes |
cmd.Flags().StringVarP(f.LabelSelector, "selector", "l", *f.LabelSelector, "Selector (label query) to filter on, not including uninitialized ones.") | ||
} | ||
if f.FieldSelector != nil { | ||
cmd.Flags().StringVarP(f.FieldSelector, "field-selector", "", *f.FieldSelector, "Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use cmd.Flags().StringVar()
here for missing shorthand letter.
/retest |
"delete" changes lgtm |
/retest |
/assign @juanvallejo |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: juanvallejo, liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
/test all Tests are more than 96 hours old. Re-running tests. |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
Builds out field selector support for more bulk commands
Release note: