From 8f48a82e6ed9fd19601ad8c32a5f1b55b4299fb0 Mon Sep 17 00:00:00 2001 From: Victor Franzi Date: Fri, 6 Dec 2024 12:03:48 +0100 Subject: [PATCH] docs: `-l/--selector` example for set-based requirements add an example of set-based requirement when using `-l/--selector` as it's a (less known) filtering capability: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#list-and-watch-filtering --- staging/src/k8s.io/kubectl/pkg/cmd/util/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/util/helpers.go b/staging/src/k8s.io/kubectl/pkg/cmd/util/helpers.go index 653aa78409b..26bdb1ac1f0 100644 --- a/staging/src/k8s.io/kubectl/pkg/cmd/util/helpers.go +++ b/staging/src/k8s.io/kubectl/pkg/cmd/util/helpers.go @@ -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) {