Skip to content

Commit 4ca1c44

Browse files
committed
Revert "Add flex start (#13691) (#22508)"
This reverts commit 374256e.
1 parent 357393a commit 4ca1c44

File tree

5 files changed

+0
-168
lines changed

5 files changed

+0
-168
lines changed

.changelog/13691.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

google/services/container/node_config.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -825,12 +825,6 @@ func schemaNodeConfig() *schema.Schema {
825825
ForceNew: true,
826826
Description: `The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s".`,
827827
},
828-
"flex_start": {
829-
Type: schema.TypeBool,
830-
Optional: true,
831-
ForceNew: true,
832-
Description: `Enables Flex Start provisioning model for the node pool`,
833-
},
834828
},
835829
},
836830
}
@@ -1205,10 +1199,6 @@ func expandNodeConfig(v interface{}) *container.NodeConfig {
12051199
nc.MaxRunDuration = v.(string)
12061200
}
12071201

1208-
if v, ok := nodeConfig["flex_start"]; ok {
1209-
nc.FlexStart = v.(bool)
1210-
}
1211-
12121202
if v, ok := nodeConfig["confidential_nodes"]; ok {
12131203
nc.ConfidentialNodes = expandConfidentialNodes(v)
12141204
}
@@ -1608,7 +1598,6 @@ func flattenNodeConfig(c *container.NodeConfig, v interface{}) []map[string]inte
16081598
"node_group": c.NodeGroup,
16091599
"advanced_machine_features": flattenAdvancedMachineFeaturesConfig(c.AdvancedMachineFeatures),
16101600
"max_run_duration": c.MaxRunDuration,
1611-
"flex_start": c.FlexStart,
16121601
"sole_tenant_config": flattenSoleTenantConfig(c.SoleTenantConfig),
16131602
"fast_socket": flattenFastSocket(c.FastSocket),
16141603
"resource_manager_tags": flattenResourceManagerTags(c.ResourceManagerTags),

google/services/container/resource_container_cluster_test.go

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -505,38 +505,6 @@ func TestAccContainerCluster_withMaxRunDuration(t *testing.T) {
505505
})
506506
}
507507

508-
func TestAccContainerCluster_withFlexStart(t *testing.T) {
509-
t.Parallel()
510-
511-
clusterName := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10))
512-
networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster")
513-
subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName)
514-
npName := fmt.Sprintf("tf-test-node-pool-%s", acctest.RandString(t, 10))
515-
516-
acctest.VcrTest(t, resource.TestCase{
517-
PreCheck: func() { acctest.AccTestPreCheck(t) },
518-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
519-
CheckDestroy: testAccCheckContainerClusterDestroyProducer(t),
520-
Steps: []resource.TestStep{
521-
{
522-
Config: testAccContainerCluster_withFlexStart(clusterName, npName, networkName, subnetworkName),
523-
Check: resource.ComposeTestCheckFunc(
524-
resource.TestCheckResourceAttr("google_container_cluster.flex_start", "node_pool.0.node_config.0.machine_type", "n1-standard-1"),
525-
resource.TestCheckResourceAttr("google_container_cluster.flex_start",
526-
"node_pool.0.node_config.0.reservation_affinity.0.consume_reservation_type", "NO_RESERVATION"),
527-
resource.TestCheckResourceAttr("google_container_cluster.flex_start", "node_pool.0.node_config.0.flex_start", "true"),
528-
),
529-
},
530-
{
531-
ResourceName: "google_container_cluster.flex_start",
532-
ImportState: true,
533-
ImportStateVerify: true,
534-
ImportStateVerifyIgnore: []string{"deletion_protection", "min_master_version", "node_pool.0.node_config.0.taint"},
535-
},
536-
},
537-
})
538-
}
539-
540508
func TestAccContainerCluster_withILBSubsetting(t *testing.T) {
541509
t.Parallel()
542510

@@ -6592,52 +6560,6 @@ resource "google_container_cluster" "max_run_duration" {
65926560
`, clusterName, npName, duration, networkName, subnetworkName)
65936561
}
65946562

6595-
func testAccContainerCluster_withFlexStart(clusterName, npName, networkName, subnetworkName string) string {
6596-
return fmt.Sprintf(`
6597-
resource "google_container_cluster" "flex_start" {
6598-
min_master_version = "1.32.3-gke.1717000"
6599-
6600-
name = "%s"
6601-
location = "us-central1-a"
6602-
6603-
release_channel {
6604-
channel = "RAPID"
6605-
}
6606-
6607-
6608-
node_pool {
6609-
name = "%s"
6610-
initial_node_count = 0
6611-
autoscaling {
6612-
total_min_node_count = 0
6613-
total_max_node_count = 1
6614-
}
6615-
6616-
node_config {
6617-
machine_type = "n1-standard-1"
6618-
flex_start = true
6619-
max_run_duration = "604800s"
6620-
6621-
reservation_affinity {
6622-
consume_reservation_type = "NO_RESERVATION"
6623-
}
6624-
6625-
taint {
6626-
key = "taint_key"
6627-
value = "taint_value"
6628-
effect = "NO_SCHEDULE"
6629-
}
6630-
}
6631-
}
6632-
6633-
deletion_protection = false
6634-
network = "%s"
6635-
subnetwork = "%s"
6636-
6637-
}
6638-
`, clusterName, npName, networkName, subnetworkName)
6639-
}
6640-
66416563
func testAccContainerCluster_withILBSubSetting(clusterName, npName, networkName, subnetworkName string) string {
66426564
return fmt.Sprintf(`
66436565
resource "google_container_cluster" "confidential_nodes" {

google/services/container/resource_container_node_pool_test.go

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -4193,80 +4193,6 @@ resource "google_container_node_pool" "np" {
41934193
`, clusterName, networkName, subnetworkName, np)
41944194
}
41954195

4196-
func TestAccContainerNodePool_withFlexStart(t *testing.T) {
4197-
t.Parallel()
4198-
4199-
clusterName := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10))
4200-
np := fmt.Sprintf("tf-test-cluster-nodepool-%s", acctest.RandString(t, 10))
4201-
networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster")
4202-
subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName)
4203-
4204-
acctest.VcrTest(t, resource.TestCase{
4205-
PreCheck: func() { acctest.AccTestPreCheck(t) },
4206-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
4207-
CheckDestroy: testAccCheckContainerClusterDestroyProducer(t),
4208-
Steps: []resource.TestStep{
4209-
{
4210-
Config: testAccContainerNodePool_withFlexStart(clusterName, np, networkName, subnetworkName),
4211-
Check: resource.ComposeTestCheckFunc(
4212-
resource.TestCheckResourceAttr("google_container_node_pool.np", "node_config.0.machine_type", "n1-standard-1"),
4213-
resource.TestCheckResourceAttr("google_container_node_pool.np",
4214-
"node_config.0.reservation_affinity.0.consume_reservation_type", "NO_RESERVATION"),
4215-
resource.TestCheckResourceAttr("google_container_node_pool.np", "node_config.0.flex_start", "true"),
4216-
),
4217-
},
4218-
{
4219-
ResourceName: "google_container_node_pool.np",
4220-
ImportState: true,
4221-
ImportStateVerify: true,
4222-
ImportStateVerifyIgnore: []string{"node_config.0.taint"},
4223-
},
4224-
},
4225-
})
4226-
}
4227-
4228-
func testAccContainerNodePool_withFlexStart(clusterName, np, networkName, subnetworkName string) string {
4229-
return fmt.Sprintf(`
4230-
resource "google_container_cluster" "cluster" {
4231-
min_master_version = "1.32.3-gke.1717000"
4232-
4233-
name = "%s"
4234-
location = "us-central1-a"
4235-
initial_node_count = 1
4236-
deletion_protection = false
4237-
network = "%s"
4238-
subnetwork = "%s"
4239-
}
4240-
4241-
resource "google_container_node_pool" "np" {
4242-
name = "%s"
4243-
location = "us-central1-a"
4244-
cluster = google_container_cluster.cluster.name
4245-
initial_node_count = 0
4246-
autoscaling {
4247-
total_min_node_count = 0
4248-
total_max_node_count = 1
4249-
}
4250-
4251-
node_config {
4252-
machine_type = "n1-standard-1"
4253-
flex_start = true
4254-
max_run_duration = "604800s"
4255-
4256-
reservation_affinity {
4257-
consume_reservation_type = "NO_RESERVATION"
4258-
}
4259-
4260-
taint {
4261-
key = "taint_key"
4262-
value = "taint_value"
4263-
effect = "NO_SCHEDULE"
4264-
}
4265-
}
4266-
}
4267-
`, clusterName, networkName, subnetworkName, np)
4268-
}
4269-
42704196
func TestAccContainerNodePool_tpuTopology(t *testing.T) {
42714197
t.Parallel()
42724198
t.Skip("https://github.com/hashicorp/terraform-provider-google/issues/15254#issuecomment-1646277473")

website/docs/r/container_cluster.html.markdown

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,6 @@ gvnic {
931931

932932
* `max_run_duration` - (Optional) The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s".
933933

934-
* `flex_start` - (Optional) Enables Flex Start provisioning model for the node pool.
935-
936934
* `local_ssd_count` - (Optional) The amount of local SSD disks that will be
937935
attached to each cluster node. Defaults to 0.
938936

0 commit comments

Comments
 (0)