remove flag logic

This commit is contained in:
john
2019-11-29 08:58:14 +00:00
parent bf339173c8
commit 61133f3e2e
7 changed files with 6 additions and 49 deletions

View File

@@ -76,7 +76,6 @@ func NewCmdBuild(out io.Writer) *cobra.Command {
addFlagLoadRestrictor(cmd.Flags())
addFlagEnablePlugins(cmd.Flags())
addFlagReorderOutput(cmd.Flags())
addFlagEnableDeepClone(cmd.Flags())
cmd.AddCommand(NewCmdBuildPrune(out))
return cmd
}
@@ -106,7 +105,6 @@ func (o *Options) makeOptions() *krusty.Options {
DoLegacyResourceSort: o.outOrder == legacy,
LoadRestrictions: getFlagLoadRestrictorValue(),
DoPrune: false,
DoDeepGitClone: isFlagEnableDeepCloneSet(),
}
if isFlagEnablePluginsSet() {
c, err := konfig.EnabledPluginConfig()

View File

@@ -1,29 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package build
import (
"github.com/spf13/pflag"
)
const (
flagEnableDeepCloneName = "enable_deep_clone"
flagEnableDeepCloneHelp = `enable deep git cloning.
See https://github.com/kubernetes-sigs/kustomize/issues/1452
`
)
var (
flagEnableDeepCloneValue = false
)
func addFlagEnableDeepClone(set *pflag.FlagSet) {
set.BoolVar(
&flagEnableDeepCloneValue, flagEnableDeepCloneName,
false, flagEnableDeepCloneHelp)
}
func isFlagEnableDeepCloneSet() bool {
return flagEnableDeepCloneValue
}