Skip to content

Commit

Permalink
Graduate support of GKE Queued Provisioning to GA (GoogleCloudPlatfor…
Browse files Browse the repository at this point in the history
  • Loading branch information
tosi3k authored and lola98 committed Mar 13, 2024
1 parent 34d2b75 commit e8a9bb5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ var schemaNodePool = map[string]*schema.Schema{
},
},

<% unless version == 'ga' -%>
"queued_provisioning": {
Type: schema.TypeList,
Optional: true,
Expand All @@ -225,7 +224,6 @@ var schemaNodePool = map[string]*schema.Schema{
},
},
},
<% end -%>

"max_pods_per_node": &schema.Schema{
Type: schema.TypeInt,
Expand Down Expand Up @@ -988,7 +986,6 @@ func expandNodePool(d *schema.ResourceData, prefix string) (*container.NodePool,
}
}

<% unless version == 'ga' -%>
if v, ok := d.GetOk(prefix + "queued_provisioning"); ok {
if v.([]interface{}) != nil && v.([]interface{})[0] != nil {
queued_provisioning := v.([]interface{})[0].(map[string]interface{})
Expand All @@ -997,7 +994,6 @@ func expandNodePool(d *schema.ResourceData, prefix string) (*container.NodePool,
}
}
}
<% end -%>

if v, ok := d.GetOk(prefix + "max_pods_per_node"); ok {
np.MaxPodsConstraint = &container.MaxPodsConstraint{
Expand Down Expand Up @@ -1192,15 +1188,13 @@ func flattenNodePool(d *schema.ResourceData, config *transport_tpg.Config, np *c
}
}

<% unless version == 'ga' -%>
if np.QueuedProvisioning != nil {
nodePool["queued_provisioning"] = []map[string]interface{}{
{
"enabled": np.QueuedProvisioning.Enabled,
},
}
}
<% end -%>

if np.MaxPodsConstraint != nil {
nodePool["max_pods_per_node"] = np.MaxPodsConstraint.MaxPodsPerNode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,6 @@ resource "google_container_node_pool" "np" {
`, cluster, networkName, subnetworkName, policyName, np)
}

<% unless version == 'ga' -%>
func TestAccContainerNodePool_enableQueuedProvisioning(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -2022,7 +2021,6 @@ resource "google_container_node_pool" "np" {
}
`, cluster, networkName, subnetworkName, np, enabled)
}
<% end -%>

func TestAccContainerNodePool_threadsPerCore(t *testing.T) {
t.Parallel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ cluster.
* `placement_policy` - (Optional) Specifies a custom placement policy for the
nodes.

* `queued_provisioning` - (Optional, Beta) Specifies node pool-level settings of queued provisioning.
* `queued_provisioning` - (Optional) Specifies node pool-level settings of queued provisioning.
Structure is [documented below](#nested_queued_provisioning).

<a name="nested_autoscaling"></a>The `autoscaling` block supports (either total or per zone limits are required):
Expand Down

0 comments on commit e8a9bb5

Please sign in to comment.