cmd.Flags().StringP("selector","l","","Selector (label query) to filter on.")
cmd.Flags().StringVarP(&options.Selector,"selector","l","","Selector (label query) to filter on.")
cmd.Flags().Bool("all",false,"[-all] to select all the specified resources.")
cmd.Flags().BoolVar(&options.DeleteAll,"all",false,"[-all] to select all the specified resources.")
cmd.Flags().Bool("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().Bool("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().Int("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("now",false,"If true, resources are signaled for immediate shutdown (same as --grace-period=1).")
cmd.Flags().BoolVar(&options.DeleteNow,"now",false,"If true, resources are signaled for immediate shutdown (same as --grace-period=1).")
cmd.Flags().Bool("force",false,"Immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.")
cmd.Flags().BoolVar(&options.ForceDeletion,"force",false,"Immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.")
cmd.Flags().Duration("timeout",0,"The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object")
cmd.Flags().DurationVar(&options.Timeout,"timeout",0,"The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object")
returnfmt.Errorf("--now and --grace-period cannot be specified together")
returnfmt.Errorf("--now and --grace-period cannot be specified together")
}
}
gracePeriod=1
o.GracePeriod=1
}
}
wait:=false
ifo.GracePeriod==0{
ifgracePeriod==0{
ifo.ForceDeletion{
ifforce{
fmt.Fprintf(o.ErrOut,"warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.\n")
fmt.Fprintf(errOut,"warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.\n")
}else{
}else{
// To preserve backwards compatibility, but prevent accidental data loss, we convert --grace-period=0
// To preserve backwards compatibility, but prevent accidental data loss, we convert --grace-period=0
// into --grace-period=1 and wait until the object is successfully deleted. Users may provide --force
// into --grace-period=1 and wait until the object is successfully deleted. Users may provide --force
cmd.Flags().BoolVar(include3rdParty,"include-extended-apis",true,"If true, include definitions of new APIs via calls to the API server. [default true]")