cmd.Flags().StringVarP(&options.Selector,"selector","l",options.Selector,"Selector (label query) to filter on, not including uninitialized ones.")
// flag-specific output flag, as this command does not depend on PrintFlags
cmd.Flags().BoolVar(&options.DeleteAll,"all",options.DeleteAll,"Delete all resources, including uninitialized ones, in the namespace of the specified resource types.")
cmd.Flags().StringP("selector","l","","Selector (label query) to filter on, not including uninitialized ones.")
cmd.Flags().BoolVar(&options.IgnoreNotFound,"ignore-not-found",options.IgnoreNotFound,"Treat \"resource not found\" as a successful delete. Defaults to \"true\" when --all is specified.")
cmd.Flags().BoolVar(&options.Cascade,"cascade",options.Cascade,"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",options.GracePeriod,"Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).")
cmd.Flags().BoolVar(&options.DeleteNow,"now",options.DeleteNow,"If true, resources are signaled for immediate shutdown (same as --grace-period=1).")
cmd.Flags().BoolVar(&options.ForceDeletion,"force",options.ForceDeletion,"Only used when grace-period=0. If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.")
cmd.Flags().DurationVar(&options.Timeout,"timeout",options.Timeout,"The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object")
// we do not need to wire PrintFlags through this command,
// as it does not deal with runtime.Objects, and only accepts the "name" output format
cmd.Flags().BoolVarP(o.Recursive,"recursive","R",*o.Recursive,"Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.")
}
ifo.Filenames!=nil{
kubectl.AddJsonFilenameFlag(cmd,o.Filenames,"Filename, directory, or URL to files "+o.Usage)
}
}
// PrintFlags composes common printer flag structs
cmd.Flags().BoolVar(f.All,"all",*f.All,"Delete all resources, including uninitialized ones, in the namespace of the specified resource types.")
}
iff.Force!=nil{
cmd.Flags().BoolVar(f.Force,"force",*f.Force,"Only used when grace-period=0. If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.")
}
iff.Cascade!=nil{
cmd.Flags().BoolVar(f.Cascade,"cascade",*f.Cascade,"If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.")
}
iff.Now!=nil{
cmd.Flags().BoolVar(f.Now,"now",*f.Now,"If true, resources are signaled for immediate shutdown (same as --grace-period=1).")
}
iff.GracePeriod!=nil{
cmd.Flags().IntVar(f.GracePeriod,"grace-period",*f.GracePeriod,"Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).")
}
iff.Timeout!=nil{
cmd.Flags().DurationVar(f.Timeout,"timeout",*f.Timeout,"The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object")
}
iff.IgnoreNotFound!=nil{
cmd.Flags().BoolVar(f.IgnoreNotFound,"ignore-not-found",*f.IgnoreNotFound,"Treat \"resource not found\" as a successful delete. Defaults to \"true\" when --all is specified.")
}
iff.Output!=nil{
cmd.Flags().StringVarP(f.Output,"output","o",*f.Output,"Output mode. Use \"-o name\" for shorter output (resource/name).")
}
// TODO: this is deprecated. Remove.
iff.IncludeThirdParty!=nil{
cmd.Flags().BoolVar(f.IncludeThirdParty,"include-extended-apis",*f.IncludeThirdParty,"If true, include definitions of new APIs via calls to the API server. [default true]")
cmd.Flags().BoolVar(&options.DeleteOptions.ForceDeletion,"force",options.DeleteOptions.ForceDeletion,"Delete and re-create the specified resource")
cmd.Flags().BoolVar(&options.DeleteOptions.Cascade,"cascade",options.DeleteOptions.Cascade,"Only relevant during a force replace. If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController).")
cmd.Flags().IntVar(&options.DeleteOptions.GracePeriod,"grace-period",options.DeleteOptions.GracePeriod,"Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative.")
cmd.Flags().DurationVar(&options.DeleteOptions.Timeout,"timeout",options.DeleteOptions.Timeout,"Only relevant during a force replace. 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).")