Deprecate --generator flag from kubectl create commands

Kubernetes-commit: be6ac856f13b994251b3c8e54b2251cf75c6847d
This commit is contained in:
Maciej Szulik 2020-02-28 11:58:53 +01:00 committed by Kubernetes Publisher
parent 4f522ad60b
commit e576e735d4
1 changed files with 1 additions and 0 deletions

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
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)
}