kubeadm: mark --experimental-kustomize as deprecated

This commit is contained in:
Lubomir I. Ivanov 2020-06-11 04:57:13 +03:00
parent 7766e65a1b
commit 7ddd966ed2
2 changed files with 5 additions and 0 deletions

View File

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

View File

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