cmd.Flags().Bool("overwrite",true,"Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration")
cmd.Flags().BoolVar(&options.Prune,"prune",false,"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.")
cmd.Flags().BoolVar(&options.Cascade,"cascade",true,"Only relevant during a prune or a force apply. If true, cascade the deletion of the resources managed by pruned or deleted resources (e.g. Pods created by a ReplicationController).")
cmd.Flags().IntVar(&options.GracePeriod,"grace-period",-1,"Only relevant during a prune or a force apply. Period of time in seconds given to pruned or deleted resources to terminate gracefully. Ignored if negative.")
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().BoolVar(&options.Overwrite,"overwrite",options.Overwrite,"Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration")
cmd.Flags().BoolVar(&options.Prune,"prune",options.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.")
cmd.Flags().BoolVar(&options.Cascade,"cascade",options.Cascade,"Only relevant during a prune or a force apply. If true, cascade the deletion of the resources managed by pruned or deleted resources (e.g. Pods created by a ReplicationController).")
cmd.Flags().IntVar(&options.GracePeriod,"grace-period",options.GracePeriod,"Only relevant during a prune or a force apply. Period of time in seconds given to pruned or deleted resources to terminate gracefully. Ignored if negative.")
cmd.Flags().BoolVar(&options.Force,"force",options.Force,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",options.Timeout,"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)
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().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().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().BoolVar(&options.All,"all",options.All,"Select all resources in the namespace of the specified resource types.")
cmd.Flags().StringArrayVar(&options.PruneWhitelist,"prune-whitelist",options.PruneWhitelist,"Overwrite the default whitelist with <group/version/kind> for --prune")
cmd.Flags().BoolVar(&options.OpenApiPatch,"openapi-patch",options.OpenApiPatch,"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().BoolVar(&options.CreateAnnotation,"create-annotation",false,"Will create 'last-applied-configuration' annotations if current objects doesn't have one")
cmd.Flags().BoolVar(&options.CreateAnnotation,"create-annotation",options.CreateAnnotation,"Will create 'last-applied-configuration' annotations if current objects doesn't have one")
usage:="that contains the last-applied-configuration annotations"
kubectl.AddJsonFilenameFlag(cmd,&options.FilenameOptions.Filenames,"Filename, directory, or URL to files "+usage)
cmd.Flags().StringP("output","o","","Output format. Must be one of yaml|json")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().BoolVar(&options.All,"all",false,"Select all resources in the namespace of the specified resource types")
cmd.Flags().StringVarP(&options.OutputFormat,"output","o",options.OutputFormat,"Output format. Must be one of yaml|json")
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().BoolVar(&options.All,"all",options.All,"Select all resources in the namespace of the specified resource types")
usage:="that contains the last-applied-configuration annotations"