enable kustomization in kubectl commands

This commit is contained in:
Jingfang Liu 2018-12-12 09:42:47 -08:00
parent d349998abe
commit 0ce8427b46
2 changed files with 2 additions and 0 deletions

View File

@ -90,6 +90,7 @@ func (f *DeleteFlags) ToOptions(dynamicClient dynamic.Interface, streams generic
options.WaitForDeletion = *f.Wait
}
options.FilenameOptions.EnableKustomization = true
return options
}

View File

@ -385,6 +385,7 @@ func AddValidateOptionFlags(cmd *cobra.Command, options *ValidateOptions) {
func AddFilenameOptionFlags(cmd *cobra.Command, options *resource.FilenameOptions, usage string) {
AddJsonFilenameFlag(cmd.Flags(), &options.Filenames, "Filename, directory, or URL to files "+usage)
cmd.Flags().BoolVarP(&options.Recursive, "recursive", "R", options.Recursive, "Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.")
options.EnableKustomization = true
}
func AddJsonFilenameFlag(flags *pflag.FlagSet, value *[]string, usage string) {