Skip to content

Commit c2f9823

Browse files
authored
Merge pull request kubernetes#103905 from dixudx/cleanup-uninitialized
cleanup description on deprecated include-uninitialized flag
2 parents 61b6233 + ae7b978 commit c2f9823

File tree

9 files changed

+15
-19
lines changed

9 files changed

+15
-19
lines changed

staging/src/k8s.io/kubectl/pkg/cmd/annotate/annotate.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ func NewCmdAnnotate(parent string, f cmdutil.Factory, ioStreams genericclioption
150150
cmd.Flags().BoolVar(&o.overwrite, "overwrite", o.overwrite, "If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.")
151151
cmd.Flags().BoolVar(&o.list, "list", o.list, "If true, display the annotations for a given resource.")
152152
cmd.Flags().BoolVar(&o.local, "local", o.local, "If true, annotation will NOT contact api-server but run locally.")
153-
cmd.Flags().StringVarP(&o.selector, "selector", "l", o.selector, "Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).")
153+
cmd.Flags().StringVarP(&o.selector, "selector", "l", o.selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).")
154154
cmd.Flags().StringVar(&o.fieldSelector, "field-selector", o.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.")
155-
cmd.Flags().BoolVar(&o.all, "all", o.all, "Select all resources, including uninitialized ones, in the namespace of the specified resource types.")
155+
cmd.Flags().BoolVar(&o.all, "all", o.all, "Select all resources, in the namespace of the specified resource types.")
156156
cmd.Flags().BoolVarP(&o.allNamespaces, "all-namespaces", "A", o.allNamespaces, "If true, check the specified action in all namespaces.")
157157
cmd.Flags().StringVar(&o.resourceVersion, "resource-version", o.resourceVersion, i18n.T("If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource."))
158158
usage := "identifying the resource to update the annotation"

staging/src/k8s.io/kubectl/pkg/cmd/apply/apply.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func NewCmdApply(baseName string, f cmdutil.Factory, ioStreams genericclioptions
187187
o.PrintFlags.AddFlags(cmd)
188188

189189
cmd.Flags().BoolVar(&o.Overwrite, "overwrite", o.Overwrite, "Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration")
190-
cmd.Flags().BoolVar(&o.Prune, "prune", o.Prune, "Automatically delete resource objects, including the uninitialized ones, that do not appear in the configs and are created by either apply or create --save-config. Should be used with either -l or --all.")
190+
cmd.Flags().BoolVar(&o.Prune, "prune", o.Prune, "Automatically delete resource objects, that do not appear in the configs and are created by either apply or create --save-config. Should be used with either -l or --all.")
191191
cmdutil.AddValidateFlags(cmd)
192192
cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
193193
cmd.Flags().BoolVar(&o.All, "all", o.All, "Select all resources in the namespace of the specified resource types.")
@@ -324,8 +324,6 @@ func isIncompatibleServerError(err error) bool {
324324
func (o *ApplyOptions) GetObjects() ([]*resource.Info, error) {
325325
var err error = nil
326326
if !o.objectsCached {
327-
// include the uninitialized objects by default if --prune is true
328-
// unless explicitly set --include-uninitialized=false
329327
r := o.Builder.
330328
Unstructured().
331329
Schema(o.Validator).

staging/src/k8s.io/kubectl/pkg/cmd/delete/delete_flags.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ func (f *DeleteFlags) ToOptions(dynamicClient dynamic.Interface, streams generic
111111
func (f *DeleteFlags) AddFlags(cmd *cobra.Command) {
112112
f.FileNameFlags.AddFlags(cmd.Flags())
113113
if f.LabelSelector != nil {
114-
cmd.Flags().StringVarP(f.LabelSelector, "selector", "l", *f.LabelSelector, "Selector (label query) to filter on, not including uninitialized ones.")
114+
cmd.Flags().StringVarP(f.LabelSelector, "selector", "l", *f.LabelSelector, "Selector (label query) to filter on.")
115115
}
116116
if f.FieldSelector != nil {
117117
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.")
118118
}
119119
if f.All != nil {
120-
cmd.Flags().BoolVar(f.All, "all", *f.All, "Delete all resources, including uninitialized ones, in the namespace of the specified resource types.")
120+
cmd.Flags().BoolVar(f.All, "all", *f.All, "Delete all resources, in the namespace of the specified resource types.")
121121
}
122122
if f.AllNamespaces != nil {
123123
cmd.Flags().BoolVarP(f.AllNamespaces, "all-namespaces", "A", *f.AllNamespaces, "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.")

staging/src/k8s.io/kubectl/pkg/cmd/get/get.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ var (
9797
desired resource type is namespaced you will only see results in your current
9898
namespace unless you pass --all-namespaces.
9999
100-
Uninitialized objects are not shown unless --include-uninitialized is passed.
101-
102100
By specifying the output as 'template' and providing a Go template as the value
103101
of the --template flag, you can filter the attributes of the fetched resources.`))
104102

@@ -185,7 +183,7 @@ func NewCmdGet(parent string, f cmdutil.Factory, streams genericclioptions.IOStr
185183
o.PrintFlags.AddFlags(cmd)
186184

187185
cmd.Flags().StringVar(&o.Raw, "raw", o.Raw, "Raw URI to request from the server. Uses the transport specified by the kubeconfig file.")
188-
cmd.Flags().BoolVarP(&o.Watch, "watch", "w", o.Watch, "After listing/getting the requested object, watch for changes. Uninitialized objects are excluded if no object name is provided.")
186+
cmd.Flags().BoolVarP(&o.Watch, "watch", "w", o.Watch, "After listing/getting the requested object, watch for changes.")
189187
cmd.Flags().BoolVar(&o.WatchOnly, "watch-only", o.WatchOnly, "Watch for changes to the requested object(s), without listing/getting first.")
190188
cmd.Flags().BoolVar(&o.OutputWatchEvents, "output-watch-events", o.OutputWatchEvents, "Output watch event objects when --watch or --watch-only is used. Existing objects are output as initial ADDED events.")
191189
cmd.Flags().BoolVar(&o.IgnoreNotFound, "ignore-not-found", o.IgnoreNotFound, "If the requested object does not exist the command will return exit code 0.")

staging/src/k8s.io/kubectl/pkg/cmd/label/label.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ func NewCmdLabel(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobr
147147
cmd.Flags().BoolVar(&o.overwrite, "overwrite", o.overwrite, "If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels.")
148148
cmd.Flags().BoolVar(&o.list, "list", o.list, "If true, display the labels for a given resource.")
149149
cmd.Flags().BoolVar(&o.local, "local", o.local, "If true, label will NOT contact api-server but run locally.")
150-
cmd.Flags().StringVarP(&o.selector, "selector", "l", o.selector, "Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).")
150+
cmd.Flags().StringVarP(&o.selector, "selector", "l", o.selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).")
151151
cmd.Flags().StringVar(&o.fieldSelector, "field-selector", o.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.")
152-
cmd.Flags().BoolVar(&o.all, "all", o.all, "Select all resources, including uninitialized ones, in the namespace of the specified resource types")
152+
cmd.Flags().BoolVar(&o.all, "all", o.all, "Select all resources, in the namespace of the specified resource types")
153153
cmd.Flags().BoolVarP(&o.allNamespaces, "all-namespaces", "A", o.allNamespaces, "If true, check the specified action in all namespaces.")
154154
cmd.Flags().StringVar(&o.resourceVersion, "resource-version", o.resourceVersion, i18n.T("If non-empty, the labels update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource."))
155155
usage := "identifying the resource to update the labels"

staging/src/k8s.io/kubectl/pkg/cmd/set/set_image.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ func NewCmdImage(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.
122122

123123
usage := "identifying the resource to get from a server."
124124
cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, usage)
125-
cmd.Flags().BoolVar(&o.All, "all", o.All, "Select all resources, including uninitialized ones, in the namespace of the specified resource types")
126-
cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
125+
cmd.Flags().BoolVar(&o.All, "all", o.All, "Select all resources, in the namespace of the specified resource types")
126+
cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
127127
cmd.Flags().BoolVar(&o.Local, "local", o.Local, "If true, set image will NOT contact api-server but run locally.")
128128
cmdutil.AddDryRunFlag(cmd)
129129
cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-set")

staging/src/k8s.io/kubectl/pkg/cmd/set/set_resources.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ func NewCmdResources(f cmdutil.Factory, streams genericclioptions.IOStreams) *co
130130
//kubectl.AddJsonFilenameFlag(cmd, &options.Filenames, usage)
131131
usage := "identifying the resource to get from a server."
132132
cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, usage)
133-
cmd.Flags().BoolVar(&o.All, "all", o.All, "Select all resources, including uninitialized ones, in the namespace of the specified resource types")
134-
cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, not including uninitialized ones,supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
133+
cmd.Flags().BoolVar(&o.All, "all", o.All, "Select all resources, in the namespace of the specified resource types")
134+
cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
135135
cmd.Flags().StringVarP(&o.ContainerSelector, "containers", "c", o.ContainerSelector, "The names of containers in the selected pod templates to change, all containers are selected by default - may use wildcards")
136136
cmd.Flags().BoolVar(&o.Local, "local", o.Local, "If true, set resources will NOT contact api-server but run locally.")
137137
cmdutil.AddDryRunFlag(cmd)

staging/src/k8s.io/kubectl/pkg/cmd/set/set_serviceaccount.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func NewCmdServiceAccount(f cmdutil.Factory, streams genericclioptions.IOStreams
113113

114114
usage := "identifying the resource to get from a server."
115115
cmdutil.AddFilenameOptionFlags(cmd, &o.fileNameOptions, usage)
116-
cmd.Flags().BoolVar(&o.all, "all", o.all, "Select all resources, including uninitialized ones, in the namespace of the specified resource types")
116+
cmd.Flags().BoolVar(&o.all, "all", o.all, "Select all resources, in the namespace of the specified resource types")
117117
cmd.Flags().BoolVar(&o.local, "local", o.local, "If true, set serviceaccount will NOT contact api-server but run locally.")
118118
cmdutil.AddDryRunFlag(cmd)
119119
cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-set")

staging/src/k8s.io/kubectl/pkg/cmd/set/set_subject.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ func NewCmdSubject(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobr
109109
o.PrintFlags.AddFlags(cmd)
110110

111111
cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, "the resource to update the subjects")
112-
cmd.Flags().BoolVar(&o.All, "all", o.All, "Select all resources, including uninitialized ones, in the namespace of the specified resource types")
113-
cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
112+
cmd.Flags().BoolVar(&o.All, "all", o.All, "Select all resources, in the namespace of the specified resource types")
113+
cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
114114
cmd.Flags().BoolVar(&o.Local, "local", o.Local, "If true, set subject will NOT contact api-server but run locally.")
115115
cmdutil.AddDryRunFlag(cmd)
116116
cmd.Flags().StringArrayVar(&o.Users, "user", o.Users, "Usernames to bind to the role")

0 commit comments

Comments
 (0)