mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #99915 from BLasan/issue-99897
Remove AddGeneratorFlag from kubectl create deployment
This commit is contained in:
commit
6dbdf144e5
@ -111,7 +111,7 @@ func NewCmdCreateDeployment(f cmdutil.Factory, ioStreams genericclioptions.IOStr
|
|||||||
|
|
||||||
cmdutil.AddApplyAnnotationFlags(cmd)
|
cmdutil.AddApplyAnnotationFlags(cmd)
|
||||||
cmdutil.AddValidateFlags(cmd)
|
cmdutil.AddValidateFlags(cmd)
|
||||||
cmdutil.AddGeneratorFlags(cmd, "")
|
cmdutil.AddDryRunFlag(cmd)
|
||||||
cmd.Flags().StringSliceVar(&o.Images, "image", o.Images, "Image names to run.")
|
cmd.Flags().StringSliceVar(&o.Images, "image", o.Images, "Image names to run.")
|
||||||
cmd.MarkFlagRequired("image")
|
cmd.MarkFlagRequired("image")
|
||||||
cmd.Flags().Int32Var(&o.Port, "port", o.Port, "The port that this container exposes.")
|
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.")
|
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) {
|
func AddChunkSizeFlag(cmd *cobra.Command, value *int64) {
|
||||||
cmd.Flags().Int64Var(value, "chunk-size", *value,
|
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.")
|
"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