Skip to content

Commit a8b3155

Browse files
committed
kubeadm: add the --experimental-patches flag in cmd/options
1 parent 7ddd966 commit a8b3155

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cmd/kubeadm/app/cmd/options/generic.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,15 @@ func AddKustomizePodsFlag(fs *pflag.FlagSet, kustomizeDir *string) {
9595
fs.StringVarP(kustomizeDir, Kustomize, "k", *kustomizeDir, "The path where kustomize patches for static pod manifests are stored.")
9696
fs.MarkDeprecated(Kustomize, fmt.Sprintf("This flag is deprecated and will be removed in a future version. Please use %s instead.", Patches))
9797
}
98+
99+
// AddPatchesFlag adds the --patches flag to the given flagset
100+
func AddPatchesFlag(fs *pflag.FlagSet, patchesDir *string) {
101+
fs.StringVar(patchesDir, Patches, *patchesDir, `Path to a directory that contains files named `+
102+
`"target[suffix][+patchtype].extension". For example, `+
103+
`"kube-apiserver0+merge.yaml" or just "etcd.json". `+
104+
`"patchtype" can be one of "strategic", "merge" or "json" and they match the patch formats `+
105+
`supported by kubectl. The default "patchtype" is "strategic". "extension" must be either `+
106+
`"json" or "yaml". "suffix" is an optional string that can be used to determine `+
107+
`which patches are applied first alpha-numerically.`,
108+
)
109+
}

0 commit comments

Comments
 (0)