Merge pull request #129106 from rotsix/patch-1

docs: `-l/--selector` example for set-based requirements

Kubernetes-commit: d1b702b0b83b7c4ea8d06b2dbd9d33e337117b9d
This commit is contained in:
Kubernetes Publisher 2024-12-12 06:40:32 +00:00
commit 74629f681a
3 changed files with 4 additions and 4 deletions

2
go.mod
View File

@ -35,7 +35,7 @@ require (
k8s.io/apimachinery v0.0.0-20241212054420-6e120e1a46e1
k8s.io/cli-runtime v0.0.0-20241212063047-f7c4fa3d3efb
k8s.io/client-go v0.0.0-20241212055154-706280d1e7c8
k8s.io/component-base v0.0.0-20241206184758-96018783480f
k8s.io/component-base v0.0.0-20241212060302-8457d3b5cc01
k8s.io/component-helpers v0.0.0-20241206185032-f8b06c415af9
k8s.io/klog/v2 v2.130.1
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f

4
go.sum
View File

@ -210,8 +210,8 @@ k8s.io/cli-runtime v0.0.0-20241212063047-f7c4fa3d3efb h1:xldFZXLucQwlQJMBplRr+EQ
k8s.io/cli-runtime v0.0.0-20241212063047-f7c4fa3d3efb/go.mod h1:6JIozvV8O8xqtAAjtFpwoIfI6WCOaCVkAyXrxQ+A7J4=
k8s.io/client-go v0.0.0-20241212055154-706280d1e7c8 h1:NHmq7kh1wCrQczoTEgi+llNoC1HLbxbh2q9T22qYEck=
k8s.io/client-go v0.0.0-20241212055154-706280d1e7c8/go.mod h1:TcUDBmfZ4VqblPEfRjbqqDg/dWjqNskTfSuwtPJfsCg=
k8s.io/component-base v0.0.0-20241206184758-96018783480f h1:RTc92IdMxq+Q0F1d4x7YPF7lCjDI+cQ86ZMwuI35E2Q=
k8s.io/component-base v0.0.0-20241206184758-96018783480f/go.mod h1:gFyRWyoxH6tMBrslFolZA4gPIXd9csFGGanhsY9CH8E=
k8s.io/component-base v0.0.0-20241212060302-8457d3b5cc01 h1:tnOWke9nSQJFx++9hwuOvLrqPUgRwuzbyTpyx6cbPfY=
k8s.io/component-base v0.0.0-20241212060302-8457d3b5cc01/go.mod h1:YE57cHlBk/9g5jhVkY5KwakqJbOJPuYmZu5eEjmPcJY=
k8s.io/component-helpers v0.0.0-20241206185032-f8b06c415af9 h1:pNONzxDv/QPvLicU5+nJ4I0nkZaZ1YeAuOr4FlUdhxE=
k8s.io/component-helpers v0.0.0-20241206185032-f8b06c415af9/go.mod h1:FPUe6xFb/xbbnUeVUtRlppAJ9aZwqjmxm7Mv79DehAw=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=

View File

@ -519,7 +519,7 @@ func AddChunkSizeFlag(cmd *cobra.Command, value *int64) {
}
func AddLabelSelectorFlagVar(cmd *cobra.Command, p *string) {
cmd.Flags().StringVarP(p, "selector", "l", *p, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints.")
cmd.Flags().StringVarP(p, "selector", "l", *p, "Selector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'.(e.g. -l key1=value1,key2=value2,key3 in (value3)). Matching objects must satisfy all of the specified label constraints.")
}
func AddPruningFlags(cmd *cobra.Command, prune *bool, pruneAllowlist *[]string, all *bool, applySetRef *string) {