mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Remove AddGeneratorFlag function
This commit is contained in:
parent
2147937c41
commit
9c8335b65a
@ -111,7 +111,7 @@ func NewCmdCreateDeployment(f cmdutil.Factory, ioStreams genericclioptions.IOStr
|
||||
|
||||
cmdutil.AddApplyAnnotationFlags(cmd)
|
||||
cmdutil.AddValidateFlags(cmd)
|
||||
cmdutil.AddGeneratorFlags(cmd, "")
|
||||
cmdutil.AddDryRunFlag(cmd)
|
||||
cmd.Flags().StringSliceVar(&o.Images, "image", o.Images, "Image names to run.")
|
||||
cmd.MarkFlagRequired("image")
|
||||
cmd.Flags().Int32Var(&o.Port, "port", o.Port, "The port that this container exposes.")
|
||||
|
@ -456,14 +456,6 @@ func AddApplyAnnotationVarFlags(cmd *cobra.Command, applyAnnotation *bool) {
|
||||
cmd.Flags().BoolVar(applyAnnotation, ApplyAnnotationsFlag, *applyAnnotation, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
|
||||
}
|
||||
|
||||
// AddGeneratorFlags adds flags common to resource generation commands
|
||||
// TODO: need to take a pass at other generator commands to use this set of flags
|
||||
func AddGeneratorFlags(cmd *cobra.Command, defaultGenerator string) {
|
||||
cmd.Flags().String("generator", defaultGenerator, "The name of the API generator to use.")
|
||||
cmd.Flags().MarkDeprecated("generator", "has no effect and will be removed in the future.")
|
||||
AddDryRunFlag(cmd)
|
||||
}
|
||||
|
||||
func AddChunkSizeFlag(cmd *cobra.Command, value *int64) {
|
||||
cmd.Flags().Int64Var(value, "chunk-size", *value,
|
||||
"Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.")
|
||||
|
Loading…
Reference in New Issue
Block a user