mirror of https://github.com/kubernetes/kops.git
Remove the SpecOverrideFlag feature flag
This commit is contained in:
parent
c8fcc2b1f3
commit
d884e5f4d9
|
@ -389,16 +389,14 @@ func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command {
|
|||
return []string{"json", "yaml"}, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
|
||||
if featureflag.SpecOverrideFlag.Enabled() {
|
||||
cmd.Flags().StringSliceVar(&options.Sets, "set", options.Sets, "Directly set values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("set", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
cmd.Flags().StringSliceVar(&options.Unsets, "unset", options.Unsets, "Directly unset values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("unset", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
}
|
||||
cmd.Flags().StringSliceVar(&options.Sets, "set", options.Sets, "Directly set values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("set", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
cmd.Flags().StringSliceVar(&options.Unsets, "unset", options.Unsets, "Directly unset values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("unset", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
|
||||
// GCE flags
|
||||
cmd.Flags().StringVar(&options.Project, "project", options.Project, "Project to use (must be set on GCE)")
|
||||
|
|
|
@ -35,7 +35,6 @@ import (
|
|||
"k8s.io/kops/pkg/commands"
|
||||
"k8s.io/kops/pkg/commands/commandutils"
|
||||
"k8s.io/kops/pkg/edit"
|
||||
"k8s.io/kops/pkg/featureflag"
|
||||
"k8s.io/kops/pkg/kopscodecs"
|
||||
"k8s.io/kops/pkg/pretty"
|
||||
"k8s.io/kops/pkg/try"
|
||||
|
@ -85,16 +84,14 @@ func NewCmdEditCluster(f *util.Factory, out io.Writer) *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
if featureflag.SpecOverrideFlag.Enabled() {
|
||||
cmd.Flags().StringSliceVar(&options.Sets, "set", options.Sets, "Directly set values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("set", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
cmd.Flags().StringSliceVar(&options.Unsets, "unset", options.Unsets, "Directly unset values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("unset", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
}
|
||||
cmd.Flags().StringSliceVar(&options.Sets, "set", options.Sets, "Directly set values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("set", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
cmd.Flags().StringSliceVar(&options.Unsets, "unset", options.Unsets, "Directly unset values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("unset", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@ import (
|
|||
"k8s.io/kops/pkg/commands"
|
||||
"k8s.io/kops/pkg/commands/commandutils"
|
||||
"k8s.io/kops/pkg/edit"
|
||||
"k8s.io/kops/pkg/featureflag"
|
||||
"k8s.io/kops/pkg/kopscodecs"
|
||||
"k8s.io/kops/pkg/pretty"
|
||||
"k8s.io/kops/pkg/try"
|
||||
|
@ -108,16 +107,14 @@ func NewCmdEditInstanceGroup(f *util.Factory, out io.Writer) *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
if featureflag.SpecOverrideFlag.Enabled() {
|
||||
cmd.Flags().StringSliceVar(&options.Sets, "set", options.Sets, "Directly set values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("set", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
cmd.Flags().StringSliceVar(&options.Unsets, "unset", options.Unsets, "Directly unset values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("unset", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
}
|
||||
cmd.Flags().StringSliceVar(&options.Sets, "set", options.Sets, "Directly set values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("set", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
cmd.Flags().StringSliceVar(&options.Unsets, "unset", options.Unsets, "Directly unset values in the spec")
|
||||
cmd.RegisterFlagCompletionFunc("unset", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||
})
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import (
|
|||
"k8s.io/kops/cmd/kops/util"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/commands"
|
||||
"k8s.io/kops/pkg/featureflag"
|
||||
"k8s.io/kops/pkg/testutils"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup"
|
||||
|
@ -183,12 +182,6 @@ func TestLifecycleManyAddons(t *testing.T) {
|
|||
func runLifecycleTest(h *testutils.IntegrationTestHarness, o *LifecycleTestOptions, cloud *awsup.MockAWSCloud) {
|
||||
ctx := context.Background()
|
||||
|
||||
featureflag.ParseFlags("+SpecOverrideFlag")
|
||||
unsetFeatureFlags := func() {
|
||||
featureflag.ParseFlags("-SpecOverrideFlag")
|
||||
}
|
||||
defer unsetFeatureFlags()
|
||||
|
||||
t := o.t
|
||||
|
||||
t.Logf("running lifecycle test for cluster %s", o.ClusterName)
|
||||
|
|
|
@ -9,7 +9,6 @@ The following experimental features are currently available:
|
|||
* `+EnableExternalDNS` - Enable external-dns with default settings (ingress sources only).
|
||||
* `+VPCSkipEnableDNSSupport` - Enables creation of a VPC that does not need DNSSupport enabled.
|
||||
* `+EnableSeparateConfigBase` - Allow a config-base that is different from the state store.
|
||||
* `+SpecOverrideFlag` - Allow setting spec values on `kops create`.
|
||||
* `+ExperimentalClusterDNS` - Turns off validation of the kubelet cluster dns flag.
|
||||
* `+GoogleCloudBucketAcl` - Enables setting the ACL on the state store bucket when using GCS
|
||||
* `+Spotinst` - Enables the use of the Spot integration
|
||||
|
|
|
@ -57,8 +57,6 @@ var (
|
|||
ExperimentalClusterDNS = new("ExperimentalClusterDNS", Bool(false))
|
||||
// GoogleCloudBucketACL means the ACL will be set on a bucket when using GCS
|
||||
GoogleCloudBucketACL = new("GoogleCloudBucketAcl", Bool(false))
|
||||
// SpecOverrideFlag allows setting spec values on create
|
||||
SpecOverrideFlag = new("SpecOverrideFlag", Bool(true))
|
||||
// Spotinst toggles the use of Spotinst integration.
|
||||
Spotinst = new("Spotinst", Bool(false))
|
||||
// SpotinstOcean toggles the use of Spotinst Ocean instance group implementation.
|
||||
|
|
|
@ -222,17 +222,13 @@ func (d *deployer) env() []string {
|
|||
|
||||
// featureFlags returns the kops feature flags to set
|
||||
func (d *deployer) featureFlags() string {
|
||||
ff := []string{
|
||||
"+SpecOverrideFlag",
|
||||
}
|
||||
val := strings.Join(ff, ",")
|
||||
for _, env := range d.Env {
|
||||
e := strings.Split(env, "=")
|
||||
if e[0] == "KOPS_FEATURE_FLAGS" && len(e) > 1 {
|
||||
val = fmt.Sprintf("%v,%v", val, e[1])
|
||||
return e[1]
|
||||
}
|
||||
}
|
||||
return val
|
||||
return ""
|
||||
}
|
||||
|
||||
// defaultClusterName returns a kops cluster name to use when ClusterName is not set
|
||||
|
|
|
@ -19,7 +19,6 @@ set -o nounset
|
|||
set -o pipefail
|
||||
set -o xtrace
|
||||
|
||||
export KOPS_FEATURE_FLAGS="SpecOverrideFlag,${KOPS_FEATURE_FLAGS:-}"
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel);
|
||||
KOPSPATH=$REPO_ROOT/.build/dist/$(go env GOOS)/$(go env GOARCH)
|
||||
PATH=$KOPSPATH:$PATH
|
||||
|
|
|
@ -44,7 +44,6 @@ export KOPS_BASE_URL
|
|||
export KOPS
|
||||
export CHANNELS
|
||||
|
||||
export KOPS_FEATURE_FLAGS="SpecOverrideFlag"
|
||||
export KOPS_RUN_TOO_NEW_VERSION=1
|
||||
|
||||
if [[ -z "${DISCOVERY_STORE-}" ]]; then
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
export KOPS_FEATURE_FLAGS="SpecOverrideFlag"
|
||||
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel);
|
||||
source "${REPO_ROOT}"/tests/e2e/scenarios/lib/common.sh
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
SCENARIO_ROOT="${REPO_ROOT}/tests/e2e/scenarios/upgrade-ha-leader-migration"
|
||||
KOPS_FEATURE_FLAGS=SpecOverrideFlag
|
||||
export KOPS_FEATURE_FLAGS
|
||||
(cd "$REPO_ROOT" && make test-e2e-install)
|
||||
|
||||
KUBETEST2="kubetest2 kops -v=2 --cloud-provider=${CLOUD_PROVIDER} --kops-root=${REPO_ROOT}"
|
||||
|
|
Loading…
Reference in New Issue