Skip to content

Commit 9552c9f

Browse files
committed
Revert shutdown grace period fields from GKE Autopilot nodePoolAutoConfig
1 parent 3c49862 commit 9552c9f

5 files changed

Lines changed: 2 additions & 42 deletions

File tree

mmv1/third_party/terraform/services/container/node_config.go.tmpl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,18 +1483,6 @@ func schemaNodePoolAutoConfigNodeKubeletConfig() *schema.Schema {
14831483
Elem: &schema.Resource{
14841484
Schema: map[string]*schema.Schema{
14851485
"insecure_kubelet_readonly_port_enabled": schemaInsecureKubeletReadonlyPortEnabled(),
1486-
"shutdown_grace_period_seconds": {
1487-
Type: schema.TypeInt,
1488-
Optional: true,
1489-
Computed: true,
1490-
Description: `Controls the total duration of time (in seconds) the node delays shutdown.`,
1491-
},
1492-
"shutdown_grace_period_critical_pods_seconds": {
1493-
Type: schema.TypeInt,
1494-
Optional: true,
1495-
Computed: true,
1496-
Description: `Controls the portion of total grace period (in seconds) that is specifically reserved for terminating critical pods.`,
1497-
},
14981486
},
14991487
},
15001488
}
@@ -3392,8 +3380,6 @@ func flattenNodePoolAutoConfigNodeKubeletConfig(c *container.NodeKubeletConfig)
33923380
if c != nil {
33933381
result = append(result, map[string]interface{}{
33943382
"insecure_kubelet_readonly_port_enabled": flattenInsecureKubeletReadonlyPortEnabled(c),
3395-
"shutdown_grace_period_seconds": c.ShutdownGracePeriodSeconds,
3396-
"shutdown_grace_period_critical_pods_seconds": c.ShutdownGracePeriodCriticalPodsSeconds,
33973383
})
33983384
}
33993385
return result

mmv1/third_party/terraform/services/container/resource_container_cluster_meta.yaml.tmpl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,6 @@ fields:
816816
- api_field: 'nodePoolAutoConfig.linuxNodeConfig.nodeKernelModuleLoading.policy'
817817
- api_field: 'nodePoolAutoConfig.networkTags.tags'
818818
- api_field: 'nodePoolAutoConfig.nodeKubeletConfig.insecureKubeletReadonlyPortEnabled'
819-
- api_field: 'nodePoolAutoConfig.nodeKubeletConfig.shutdownGracePeriodSeconds'
820-
- api_field: 'nodePoolAutoConfig.nodeKubeletConfig.shutdownGracePeriodCriticalPodsSeconds'
821819
- field: 'node_pool_auto_config.resource_manager_tags'
822820
api_field: 'nodePoolAutoConfig.resourceManagerTags.tags'
823821
- api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.privateRegistryAccessConfig.certificateAuthorityDomainConfig.fqdns'

mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.tmpl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17508,13 +17508,6 @@ resource "google_container_cluster" "primary" {
1750817508
}
1750917509
}
1751017510
}
17511-
17512-
node_pool_auto_config {
17513-
node_kubelet_config {
17514-
shutdown_grace_period_critical_pods_seconds = 30
17515-
shutdown_grace_period_seconds = 120
17516-
}
17517-
}
1751817511
}
1751917512
`, clusterName, networkName, subnetworkName)
1752017513
}

mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,8 @@ workload_identity_config {
13251325

13261326
<a name="nested_node_pool_auto_config"></a>The `node_pool_auto_config` block supports:
13271327

1328-
* `node_kubelet_config` - (Optional) Kubelet configuration for Autopilot clusters. Structure is [documented below](#nested_node_kubelet_config).
1328+
* `node_kubelet_config` - (Optional) Kubelet configuration for Autopilot clusters. Currently, only `insecure_kubelet_readonly_port_enabled` is supported here.
1329+
Structure is [documented below](#nested_node_kubelet_config).
13291330

13301331
* `resource_manager_tags` - (Optional) A map of resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. Tags must be according to specifications found [here](https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications). A maximum of 5 tag key-value pairs can be specified. Existing tags will be replaced with new values. Tags must be in one of the following formats ([KEY]=[VALUE]) 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` 2. `{org_id}/{tag_key_name}={tag_value_name}` 3. `{project_id}/{tag_key_name}={tag_value_name}`.
13311332

@@ -1336,10 +1337,6 @@ workload_identity_config {
13361337
<a name="nested_node_kubelet_config"></a>The `node_kubelet_config` block supports:
13371338

13381339
* `insecure_kubelet_readonly_port_enabled` - (Optional) Controls whether the kubelet read-only port is enabled. It is strongly recommended to set this to `FALSE`. Possible values: `TRUE`, `FALSE`.
1339-
1340-
* `shutdown_grace_period_seconds` - (Optional) The grace period (in seconds) to use during a graceful node shutdown. This is the time allocated for all pods (critical and non-critical) to terminate. The value must be between 10 and 10000. This field can only be configured if the node pool uses Spot VMs or Preemptible VMs.
1341-
1342-
* `shutdown_grace_period_critical_pods_seconds` - (Optional) The grace period (in seconds) to use during a graceful node shutdown for critical pods. This value must be less than or equal to `shutdown_grace_period_seconds`. This field can only be configured if the node pool uses Spot VMs or Preemptible VMs.
13431340

13441341
<a name="nested_network_tags"></a>The `network_tags` block supports:
13451342

mmv1/third_party/tgc_next/pkg/services/container/node_config.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,18 +1383,6 @@ func schemaNodePoolAutoConfigNodeKubeletConfig() *schema.Schema {
13831383
Elem: &schema.Resource{
13841384
Schema: map[string]*schema.Schema{
13851385
"insecure_kubelet_readonly_port_enabled": schemaInsecureKubeletReadonlyPortEnabled(),
1386-
"shutdown_grace_period_seconds": {
1387-
Type: schema.TypeInt,
1388-
Optional: true,
1389-
Computed: true,
1390-
Description: `Controls the total duration of time (in seconds) the node delays shutdown.`,
1391-
},
1392-
"shutdown_grace_period_critical_pods_seconds": {
1393-
Type: schema.TypeInt,
1394-
Optional: true,
1395-
Computed: true,
1396-
Description: `Controls the portion of total grace period (in seconds) that is specifically reserved for terminating critical pods.`,
1397-
},
13981386
},
13991387
},
14001388
}
@@ -3179,8 +3167,6 @@ func flattenNodePoolAutoConfigNodeKubeletConfig(v interface{}) []map[string]inte
31793167
transformed := map[string]interface{}{}
31803168
if c != nil {
31813169
transformed["insecure_kubelet_readonly_port_enabled"] = flattenInsecureKubeletReadonlyPortEnabled(c)
3182-
transformed["shutdown_grace_period_seconds"] = c["shutdownGracePeriodSeconds"]
3183-
transformed["shutdown_grace_period_critical_pods_seconds"] = c["shutdownGracePeriodCriticalPodsSeconds"]
31843170
}
31853171

31863172
return []map[string]interface{}{transformed}

0 commit comments

Comments
 (0)