Merge pull request #99915 from BLasan/issue-99897

Remove AddGeneratorFlag from kubectl create deployment
This commit is contained in:
Kubernetes Prow Robot 2021-04-22 13:18:13 -07:00 committed by GitHub
commit 6dbdf144e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -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.")

View File

@ -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.")