cmd.Flags().Bool("overwrite",false,"If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.")
cmd.Flags().BoolVar(&options.overwrite,"overwrite",options.overwrite,"If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.")
cmd.Flags().Bool("local",false,"If true, annotation will NOT contact api-server but run locally.")
cmd.Flags().BoolVar(&options.local,"local",options.local,"If true, annotation will NOT contact api-server but run locally.")
cmd.Flags().StringP("selector","l","","Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).")
cmd.Flags().StringVarP(&options.selector,"selector","l",options.selector,"Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).")
cmd.Flags().Bool("all",false,"Select all resources, including uninitialized ones, in the namespace of the specified resource types.")
cmd.Flags().BoolVar(&options.all,"all",options.all,"Select all resources, including uninitialized ones, in the namespace of the specified resource types.")
cmd.Flags().String("resource-version","",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."))
cmd.Flags().StringVar(&options.resourceVersion,"resource-version",options.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."))
usage:="identifying the resource to update the annotation"
usage:="identifying the resource to update the annotation"
cmd.Flags().BoolVar(&options.Force,"force",false,fmt.Sprintf("Delete and re-create the specified resource, when PATCH encounters conflict and has retried for %d times.",maxPatchRetry))
cmd.Flags().BoolVar(&options.Force,"force",false,fmt.Sprintf("Delete and re-create the specified resource, when PATCH encounters conflict and has retried for %d times.",maxPatchRetry))
cmd.Flags().DurationVar(&options.Timeout,"timeout",0,"Only relevant during a force apply. The length of time to wait before giving up on a delete of the old resource, zero means determine a timeout from the size of the object. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h).")
cmd.Flags().DurationVar(&options.Timeout,"timeout",0,"Only relevant during a force apply. The length of time to wait before giving up on a delete of the old resource, zero means determine a timeout from the size of the object. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h).")
cmdutil.AddValidateFlags(cmd)
cmdutil.AddValidateFlags(cmd)
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().StringVarP(&options.Selector,"selector","l",options.Selector,"Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().Bool("all",false,"Select all resources in the namespace of the specified resource types.")
cmd.Flags().BoolVar(&options.all,"all",options.all,"Select all resources in the namespace of the specified resource types.")
cmd.Flags().StringArray("prune-whitelist",[]string{},"Overwrite the default whitelist with <group/version/kind> for --prune")
cmd.Flags().StringArray("prune-whitelist",[]string{},"Overwrite the default whitelist with <group/version/kind> for --prune")
cmd.Flags().Bool("openapi-patch",true,"If true, use openapi to calculate diff when the openapi presents and the resource can be found in the openapi spec. Otherwise, fall back to use baked-in types.")
cmd.Flags().Bool("openapi-patch",true,"If true, use openapi to calculate diff when the openapi presents and the resource can be found in the openapi spec. Otherwise, fall back to use baked-in types.")
returnfmt.Errorf("cannot set --all and --selector at the same time")
}
ifprune&&!all&&selector==""{
ifprune&&!all&&selector==""{
returnfmt.Errorf("all resources selected for prune without explicitly passing --all. To prune all resources, pass the --all flag. If you did not mean to prune all resources, specify a label selector.")
returnfmt.Errorf("all resources selected for prune without explicitly passing --all. To prune all resources, pass the --all flag. If you did not mean to prune all resources, specify a label selector.")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, not including uninitialized ones.")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, not including uninitialized ones.")
cmd.Flags().BoolVar(&options.DeleteAll,"all",false,"Delete all resources, including uninitialized ones, in the namespace of the specified resource types.")
cmd.Flags().BoolVar(&options.DeleteAll,"all",options.DeleteAll,"Delete all resources, including uninitialized ones, in the namespace of the specified resource types.")
cmd.Flags().BoolVar(&options.IgnoreNotFound,"ignore-not-found",false,"Treat \"resource not found\" as a successful delete. Defaults to \"true\" when --all is specified.")
cmd.Flags().BoolVar(&options.IgnoreNotFound,"ignore-not-found",false,"Treat \"resource not found\" as a successful delete. Defaults to \"true\" when --all is specified.")
cmd.Flags().BoolVar(&options.Cascade,"cascade",true,"If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.")
cmd.Flags().BoolVar(&options.Cascade,"cascade",true,"If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.")
cmd.Flags().IntVar(&options.GracePeriod,"grace-period",-1,"Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.")
cmd.Flags().IntVar(&options.GracePeriod,"grace-period",-1,"Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.")
cmd.Flags().Bool("overwrite",false,"If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels.")
cmd.Flags().BoolVar(&options.overwrite,"overwrite",false,"If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels.")
cmd.Flags().BoolVar(&options.list,"list",options.list,"If true, display the labels for a given resource.")
cmd.Flags().BoolVar(&options.list,"list",options.list,"If true, display the labels for a given resource.")
cmd.Flags().Bool("local",false,"If true, label will NOT contact api-server but run locally.")
cmd.Flags().BoolVar(&options.local,"local",options.local,"If true, label will NOT contact api-server but run locally.")
cmd.Flags().StringP("selector","l","","Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).")
cmd.Flags().StringVarP(&options.selector,"selector","l",options.selector,"Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).")
cmd.Flags().Bool("all",false,"Select all resources, including uninitialized ones, in the namespace of the specified resource types")
cmd.Flags().BoolVar(&options.all,"all",options.all,"Select all resources, including uninitialized ones, in the namespace of the specified resource types")
cmd.Flags().String("resource-version","",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."))
cmd.Flags().StringVar(&options.resourceVersion,"resource-version",options.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."))
usage:="identifying the resource to update the labels"
usage:="identifying the resource to update the labels"
cmd.Flags().BoolVar(&options.List,"list",options.List,"If true, display the environment and any changes in the standard format. this flag will removed when we have kubectl view env.")
cmd.Flags().BoolVar(&options.List,"list",options.List,"If true, display the environment and any changes in the standard format. this flag will removed when we have kubectl view env.")
cmd.Flags().BoolVar(&options.Resolve,"resolve",options.Resolve,"If true, show secret or configmap references when listing variables")
cmd.Flags().BoolVar(&options.Resolve,"resolve",options.Resolve,"If true, show secret or configmap references when listing variables")
cmd.Flags().StringVarP(&options.Selector,"selector","l",options.Selector,"Selector (label query) to filter on")
cmd.Flags().StringVarP(&options.Selector,"selector","l",options.Selector,"Selector (label query) to filter on")
cmd.Flags().BoolVar(&options.Local,"local",false,"If true, set env will NOT contact api-server but run locally.")
cmd.Flags().BoolVar(&options.Local,"local",options.Local,"If true, set env will NOT contact api-server but run locally.")
cmd.Flags().BoolVar(&options.All,"all",options.All,"If true, select all resources in the namespace of the specified resource types")
cmd.Flags().BoolVar(&options.All,"all",options.All,"If true, select all resources in the namespace of the specified resource types")
cmd.Flags().BoolVar(&options.Overwrite,"overwrite",true,"If true, allow environment to be overwritten, otherwise reject updates that overwrite existing environment.")
cmd.Flags().BoolVar(&options.Overwrite,"overwrite",true,"If true, allow environment to be overwritten, otherwise reject updates that overwrite existing environment.")
cmd.Flags().BoolVar(&options.All,"all",false,"Select all resources, including uninitialized ones, in the namespace of the specified resource types")
cmd.Flags().BoolVar(&options.All,"all",options.All,"Select all resources, including uninitialized ones, in the namespace of the specified resource types")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().BoolVar(&options.Local,"local",false,"If true, set image will NOT contact api-server but run locally.")
cmd.Flags().BoolVar(&options.Local,"local",options.Local,"If true, set image will NOT contact api-server but run locally.")
cmd.Flags().BoolVar(&options.All,"all",false,"Select all resources, including uninitialized ones, in the namespace of the specified resource types")
cmd.Flags().BoolVar(&options.All,"all",options.All,"Select all resources, including uninitialized ones, in the namespace of the specified resource types")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, not including uninitialized ones,supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, not including uninitialized ones,supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().StringVarP(&options.ContainerSelector,"containers","c","*","The names of containers in the selected pod templates to change, all containers are selected by default - may use wildcards")
cmd.Flags().StringVarP(&options.ContainerSelector,"containers","c","*","The names of containers in the selected pod templates to change, all containers are selected by default - may use wildcards")
cmd.Flags().BoolVar(&options.Local,"local",false,"If true, set resources will NOT contact api-server but run locally.")
cmd.Flags().BoolVar(&options.Local,"local",options.Local,"If true, set resources will NOT contact api-server but run locally.")
cmd.Flags().BoolVar(&options.All,"all",false,"Select all resources, including uninitialized ones, in the namespace of the specified resource types")
cmd.Flags().BoolVar(&options.All,"all",options.All,"Select all resources, including uninitialized ones, in the namespace of the specified resource types")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().BoolVar(&options.Local,"local",false,"If true, set subject will NOT contact api-server but run locally.")
cmd.Flags().BoolVar(&options.Local,"local",options.Local,"If true, set subject will NOT contact api-server but run locally.")
cmdutil.AddDryRunFlag(cmd)
cmdutil.AddDryRunFlag(cmd)
cmd.Flags().StringArrayVar(&options.Users,"user",[]string{},"Usernames to bind to the role")
cmd.Flags().StringArrayVar(&options.Users,"user",[]string{},"Usernames to bind to the role")
cmd.Flags().StringArrayVar(&options.Groups,"group",[]string{},"Groups to bind to the role")
cmd.Flags().StringArrayVar(&options.Groups,"group",[]string{},"Groups to bind to the role")