diff --git a/cmd/kubeadm/app/cmd/options/constant.go b/cmd/kubeadm/app/cmd/options/constant.go index b9154826d56..09a521af8da 100644 --- a/cmd/kubeadm/app/cmd/options/constant.go +++ b/cmd/kubeadm/app/cmd/options/constant.go @@ -145,4 +145,7 @@ const ( // Kustomize flag sets the folder where kustomize patches for static pod manifest are stored Kustomize = "experimental-kustomize" + + // Patches flag sets the folder where kubeadm component patches are stored + Patches = "experimental-patches" ) diff --git a/cmd/kubeadm/app/cmd/options/generic.go b/cmd/kubeadm/app/cmd/options/generic.go index 717403a1935..2f52fec618c 100644 --- a/cmd/kubeadm/app/cmd/options/generic.go +++ b/cmd/kubeadm/app/cmd/options/generic.go @@ -17,6 +17,7 @@ limitations under the License. package options import ( + "fmt" "strings" "github.com/spf13/pflag" @@ -92,4 +93,5 @@ func AddKubeadmOtherFlags(flagSet *pflag.FlagSet, rootfsPath *string) { // AddKustomizePodsFlag adds the --kustomize flag to the given flagset func AddKustomizePodsFlag(fs *pflag.FlagSet, kustomizeDir *string) { fs.StringVarP(kustomizeDir, Kustomize, "k", *kustomizeDir, "The path where kustomize patches for static pod manifests are stored.") + fs.MarkDeprecated(Kustomize, fmt.Sprintf("This flag is deprecated and will be removed in a future version. Please use %s instead.", Patches)) }