Merge pull request #88655 from soltysh/deprecate_generator

Deprecate --generator flag from kubectl create commands
This commit is contained in:
Kubernetes Prow Robot
2020-03-03 12:17:01 -08:00
committed by GitHub

View File

@@ -452,6 +452,7 @@ func AddApplyAnnotationVarFlags(cmd *cobra.Command, applyAnnotation *bool) {
// TODO: need to take a pass at other generator commands to use this set of flags // TODO: need to take a pass at other generator commands to use this set of flags
func AddGeneratorFlags(cmd *cobra.Command, defaultGenerator string) { func AddGeneratorFlags(cmd *cobra.Command, defaultGenerator string) {
cmd.Flags().String("generator", defaultGenerator, "The name of the API generator to use.") 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) AddDryRunFlag(cmd)
} }