Merge pull request #13903 from justinsb/take_gce_out_of_beta

gce: Move out of beta, drop feature flag
This commit is contained in:
Kubernetes Prow Robot 2022-06-28 09:43:58 -07:00 committed by GitHub
commit e34335fd43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 3 additions and 22 deletions

View File

@ -985,7 +985,7 @@ func completeNetworking(options *CreateClusterOptions) func(cmd *cobra.Command,
completions = append(completions, "amazonvpc") completions = append(completions, "amazonvpc")
} }
if featureflag.AlphaAllowGCE.Enabled() && (options.CloudProvider == "gce" || options.CloudProvider == "") { if options.CloudProvider == "gce" || options.CloudProvider == "" {
completions = append(completions, "gce") completions = append(completions, "gce")
} }
} }

View File

@ -1291,8 +1291,6 @@ func (i *integrationTest) runTestPhase(t *testing.T, phase cloudup.Phase) {
} }
func (i *integrationTest) runTestTerraformGCE(t *testing.T) { func (i *integrationTest) runTestTerraformGCE(t *testing.T) {
featureflag.ParseFlags("+AlphaAllowGCE")
h := testutils.NewIntegrationTestHarness(t) h := testutils.NewIntegrationTestHarness(t)
defer h.Close() defer h.Close()

View File

@ -473,8 +473,6 @@ func runLifecycleTestGCE(o *LifecycleTestOptions) {
h.MockKopsVersion("1.21.0-alpha.1") h.MockKopsVersion("1.21.0-alpha.1")
featureflag.ParseFlags("AlphaAllowGCE")
cloud := h.SetupMockGCE() cloud := h.SetupMockGCE()
var beforeIds []string var beforeIds []string

View File

@ -73,7 +73,7 @@ kops create cluster [CLUSTER] [flags]
--authorization string Authorization mode: AlwaysAllow or RBAC (default "RBAC") --authorization string Authorization mode: AlwaysAllow or RBAC (default "RBAC")
--bastion Enable a bastion instance group. Only applies to private topology. --bastion Enable a bastion instance group. Only applies to private topology.
--channel string Channel for default versions and configuration to use (default "stable") --channel string Channel for default versions and configuration to use (default "stable")
--cloud string Cloud provider to use - aws, digitalocean, openstack --cloud string Cloud provider to use - aws, digitalocean, gce, openstack
--cloud-labels string A list of key/value pairs used to tag all instance groups (for example "Owner=John Doe,Team=Some Team"). --cloud-labels string A list of key/value pairs used to tag all instance groups (for example "Owner=John Doe,Team=Some Team").
--container-runtime string Container runtime to use: containerd, docker --container-runtime string Container runtime to use: containerd, docker
--disable-subnet-tags Disable automatic subnet tagging --disable-subnet-tags Disable automatic subnet tagging

View File

@ -34,7 +34,6 @@ You can also put this in your `~/.bashrc` or similar.
PROJECT=`gcloud config get-value project` PROJECT=`gcloud config get-value project`
export KOPS_FEATURE_FLAGS=AlphaAllowGCE # to unlock the GCE features
kops create cluster simple.k8s.local --zones us-central1-a --state ${KOPS_STATE_STORE}/ --project=${PROJECT} kops create cluster simple.k8s.local --zones us-central1-a --state ${KOPS_STATE_STORE}/ --project=${PROJECT}

View File

@ -44,7 +44,4 @@ KOPS_STATE_STORE="gs://kops-state-$(gcloud config get-value project)"
export KOPS_STATE_STORE export KOPS_STATE_STORE
gsutil ls "${KOPS_STATE_STORE}" || gsutil mb "${KOPS_STATE_STORE}" || return gsutil ls "${KOPS_STATE_STORE}" || gsutil mb "${KOPS_STATE_STORE}" || return
# Set feature flags needed on GCE
export KOPS_FEATURE_FLAGS=AlphaAllowGCE
echo "SUCCESS" echo "SUCCESS"

View File

@ -25,14 +25,12 @@ func SupportedClouds() []kops.CloudProviderID {
clouds := []kops.CloudProviderID{ clouds := []kops.CloudProviderID{
kops.CloudProviderAWS, kops.CloudProviderAWS,
kops.CloudProviderDO, kops.CloudProviderDO,
kops.CloudProviderGCE,
kops.CloudProviderOpenstack, kops.CloudProviderOpenstack,
} }
if featureflag.Azure.Enabled() { if featureflag.Azure.Enabled() {
clouds = append(clouds, kops.CloudProviderAzure) clouds = append(clouds, kops.CloudProviderAzure)
} }
if featureflag.AlphaAllowGCE.Enabled() {
clouds = append(clouds, kops.CloudProviderGCE)
}
if featureflag.Hetzner.Enabled() { if featureflag.Hetzner.Enabled() {
clouds = append(clouds, kops.CloudProviderHetzner) clouds = append(clouds, kops.CloudProviderHetzner)
} }

View File

@ -86,8 +86,6 @@ var (
UseAddonOperators = new("UseAddonOperators", Bool(false)) UseAddonOperators = new("UseAddonOperators", Bool(false))
// TerraformManagedFiles enables rendering managed files into the Terraform configuration. // TerraformManagedFiles enables rendering managed files into the Terraform configuration.
TerraformManagedFiles = new("TerraformManagedFiles", Bool(true)) TerraformManagedFiles = new("TerraformManagedFiles", Bool(true))
// AlphaAllowGCE is a feature flag that gates GCE support while it is alpha.
AlphaAllowGCE = new("AlphaAllowGCE", Bool(false))
// Karpenter enables karpenter-managed Instance Groups // Karpenter enables karpenter-managed Instance Groups
Karpenter = new("Karpenter", Bool(false)) Karpenter = new("Karpenter", Bool(false))
// ImageDigest remaps all manifests with image digests // ImageDigest remaps all manifests with image digests

View File

@ -216,7 +216,6 @@ func (d *deployer) env() []string {
func (d *deployer) featureFlags() string { func (d *deployer) featureFlags() string {
ff := []string{ ff := []string{
"+SpecOverrideFlag", "+SpecOverrideFlag",
"+AlphaAllowGCE",
} }
val := strings.Join(ff, ",") val := strings.Join(ff, ",")
for _, env := range d.Env { for _, env := range d.Env {

View File

@ -41,7 +41,6 @@ OVERRIDES=("--channel=alpha" "--node-count=1" "--master-count=3")
case "${CLOUD_PROVIDER}" in case "${CLOUD_PROVIDER}" in
gce) gce)
export KOPS_FEATURE_FLAGS="${KOPS_FEATURE_FLAGS},AlphaAllowGCE"
OVERRIDES+=( OVERRIDES+=(
"--zones=us-central1-a,us-central1-b,us-central1-c" "--zones=us-central1-a,us-central1-b,us-central1-c"
"--master-zones=us-central1-a,us-central1-b,us-central1-c" "--master-zones=us-central1-a,us-central1-b,us-central1-c"

View File

@ -401,11 +401,6 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error {
{ {
gceCloud := cloud.(gce.GCECloud) gceCloud := cloud.(gce.GCECloud)
project = gceCloud.Project() project = gceCloud.Project()
if !featureflag.AlphaAllowGCE.Enabled() {
return fmt.Errorf("GCE support is currently alpha, and is feature-gated. export KOPS_FEATURE_FLAGS=AlphaAllowGCE")
}
} }
case kops.CloudProviderHetzner: case kops.CloudProviderHetzner: