Skip to content

Commit 754f4e3

Browse files
florianmutterapeabodyrenovate[bot]dependabot[bot]bharathkkb
authored
feat!: Promote node sysctl config to GA (#1536)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Andrew Peabody <andrewpeabody@google.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
1 parent 24c09ec commit 754f4e3

File tree

33 files changed

+136
-30
lines changed

33 files changed

+136
-30
lines changed

Diff for: README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ Then perform the following commands on the root folder:
188188
| node\_metadata | Specifies how node metadata is exposed to the workload running on the node | `string` | `"GKE_METADATA"` | no |
189189
| node\_pools | List of maps containing node pools | `list(map(any))` | <pre>[<br> {<br> "name": "default-node-pool"<br> }<br>]</pre> | no |
190190
| node\_pools\_labels | Map of maps containing node labels by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
191+
| node\_pools\_linux\_node\_configs\_sysctls | Map of maps containing linux node config sysctls by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
191192
| node\_pools\_metadata | Map of maps containing node metadata by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
192193
| node\_pools\_oauth\_scopes | Map of lists containing node oauth scopes by node-pool name | `map(list(string))` | <pre>{<br> "all": [<br> "https://www.googleapis.com/auth/cloud-platform"<br> ],<br> "default-node-pool": []<br>}</pre> | no |
193194
| node\_pools\_resource\_labels | Map of maps containing resource labels by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
@@ -310,7 +311,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
310311
- [kubectl](https://github.com/kubernetes/kubernetes/releases) 1.9.x
311312
#### Terraform and Plugins
312313
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
313-
- [Terraform Provider for GCP][terraform-provider-google] v4.47
314+
- [Terraform Provider for GCP][terraform-provider-google] v4.51
314315
#### gcloud
315316
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.
316317
See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information.

Diff for: autogen/main/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
256256
#### Terraform and Plugins
257257
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
258258
{% if beta_cluster %}
259-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.47
259+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.51
260260
{% else %}
261-
- [Terraform Provider for GCP][terraform-provider-google] v4.47
261+
- [Terraform Provider for GCP][terraform-provider-google] v4.51
262262
{% endif %}
263263
#### gcloud
264264
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.

Diff for: autogen/main/cluster.tf.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ resource "google_container_node_pool" "windows_pools" {
803803
cpu_cfs_quota_period = lookup(each.value, "cpu_cfs_quota_period", null)
804804
}
805805
}
806+
{% endif %}
806807

807808
{% if i == 0 %}
808809
dynamic "linux_node_config" {
@@ -819,7 +820,6 @@ resource "google_container_node_pool" "windows_pools" {
819820
}
820821
}
821822
{% endif %}
822-
{% endif %}
823823

824824
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
825825

Diff for: autogen/main/variables.tf.tmpl

-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ variable "node_pools_metadata" {
191191
default-node-pool = {}
192192
}
193193
}
194-
{% if beta_cluster %}
195194

196195
variable "node_pools_linux_node_configs_sysctls" {
197196
type = map(map(string))
@@ -204,7 +203,6 @@ variable "node_pools_linux_node_configs_sysctls" {
204203
}
205204
}
206205
{% endif %}
207-
{% endif %}
208206

209207
variable "enable_cost_allocation" {
210208
type = bool

Diff for: autogen/main/variables_defaults.tf.tmpl

-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ locals {
104104
),
105105
var.node_pools_oauth_scopes
106106
)
107-
{% if beta_cluster %}
108107

109108
node_pools_linux_node_configs_sysctls = merge(
110109
{ all = {} },
@@ -115,6 +114,5 @@ locals {
115114
),
116115
var.node_pools_linux_node_configs_sysctls
117116
)
118-
{% endif %}
119117
}
120118
{% endif %}

Diff for: autogen/main/versions.tf.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ terraform {
2424
required_providers {
2525
google-beta = {
2626
source = "hashicorp/google-beta"
27-
version = ">= 4.47.0, < 5.0"
27+
version = ">= 4.51.0, < 5.0"
2828
}
2929
kubernetes = {
3030
source = "hashicorp/kubernetes"
@@ -38,7 +38,7 @@ terraform {
3838
required_providers {
3939
google = {
4040
source = "hashicorp/google"
41-
version = ">= 4.47.0, < 5.0"
41+
version = ">= 4.51.0, < 5.0"
4242
}
4343
kubernetes = {
4444
source = "hashicorp/kubernetes"

Diff for: cluster.tf

+15
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,20 @@ resource "google_container_node_pool" "pools" {
499499
}
500500

501501

502+
dynamic "linux_node_config" {
503+
for_each = length(merge(
504+
local.node_pools_linux_node_configs_sysctls["all"],
505+
local.node_pools_linux_node_configs_sysctls[each.value["name"]]
506+
)) != 0 ? [1] : []
507+
508+
content {
509+
sysctls = merge(
510+
local.node_pools_linux_node_configs_sysctls["all"],
511+
local.node_pools_linux_node_configs_sysctls[each.value["name"]]
512+
)
513+
}
514+
}
515+
502516
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
503517

504518
shielded_instance_config {
@@ -657,6 +671,7 @@ resource "google_container_node_pool" "windows_pools" {
657671
}
658672

659673

674+
660675
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
661676

662677
shielded_instance_config {

Diff for: modules/beta-autopilot-private-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
187187
- [kubectl](https://github.com/kubernetes/kubernetes/releases) 1.9.x
188188
#### Terraform and Plugins
189189
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
190-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.47
190+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.51
191191
#### gcloud
192192
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.
193193
See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information.

Diff for: modules/beta-autopilot-private-cluster/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.47.0, < 5.0"
24+
version = ">= 4.51.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

Diff for: modules/beta-autopilot-public-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
174174
- [kubectl](https://github.com/kubernetes/kubernetes/releases) 1.9.x
175175
#### Terraform and Plugins
176176
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
177-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.47
177+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.51
178178
#### gcloud
179179
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.
180180
See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information.

Diff for: modules/beta-autopilot-public-cluster/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.47.0, < 5.0"
24+
version = ">= 4.51.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

Diff for: modules/beta-private-cluster-update-variant/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
379379
- [kubectl](https://github.com/kubernetes/kubernetes/releases) 1.9.x
380380
#### Terraform and Plugins
381381
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
382-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.47
382+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.51
383383
#### gcloud
384384
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.
385385
See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information.

Diff for: modules/beta-private-cluster-update-variant/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.47.0, < 5.0"
24+
version = ">= 4.51.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

Diff for: modules/beta-private-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
357357
- [kubectl](https://github.com/kubernetes/kubernetes/releases) 1.9.x
358358
#### Terraform and Plugins
359359
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
360-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.47
360+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.51
361361
#### gcloud
362362
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.
363363
See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information.

Diff for: modules/beta-private-cluster/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.47.0, < 5.0"
24+
version = ">= 4.51.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

Diff for: modules/beta-public-cluster-update-variant/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
366366
- [kubectl](https://github.com/kubernetes/kubernetes/releases) 1.9.x
367367
#### Terraform and Plugins
368368
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
369-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.47
369+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.51
370370
#### gcloud
371371
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.
372372
See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information.

Diff for: modules/beta-public-cluster-update-variant/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.47.0, < 5.0"
24+
version = ">= 4.51.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

Diff for: modules/beta-public-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
344344
- [kubectl](https://github.com/kubernetes/kubernetes/releases) 1.9.x
345345
#### Terraform and Plugins
346346
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
347-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.47
347+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v4.51
348348
#### gcloud
349349
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.
350350
See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information.

Diff for: modules/beta-public-cluster/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.47.0, < 5.0"
24+
version = ">= 4.51.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

Diff for: modules/private-cluster-update-variant/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ Then perform the following commands on the root folder:
221221
| node\_metadata | Specifies how node metadata is exposed to the workload running on the node | `string` | `"GKE_METADATA"` | no |
222222
| node\_pools | List of maps containing node pools | `list(map(any))` | <pre>[<br> {<br> "name": "default-node-pool"<br> }<br>]</pre> | no |
223223
| node\_pools\_labels | Map of maps containing node labels by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
224+
| node\_pools\_linux\_node\_configs\_sysctls | Map of maps containing linux node config sysctls by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
224225
| node\_pools\_metadata | Map of maps containing node metadata by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
225226
| node\_pools\_oauth\_scopes | Map of lists containing node oauth scopes by node-pool name | `map(list(string))` | <pre>{<br> "all": [<br> "https://www.googleapis.com/auth/cloud-platform"<br> ],<br> "default-node-pool": []<br>}</pre> | no |
226227
| node\_pools\_resource\_labels | Map of maps containing resource labels by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
@@ -345,7 +346,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
345346
- [kubectl](https://github.com/kubernetes/kubernetes/releases) 1.9.x
346347
#### Terraform and Plugins
347348
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
348-
- [Terraform Provider for GCP][terraform-provider-google] v4.47
349+
- [Terraform Provider for GCP][terraform-provider-google] v4.51
349350
#### gcloud
350351
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.
351352
See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information.

Diff for: modules/private-cluster-update-variant/cluster.tf

+15
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,20 @@ resource "google_container_node_pool" "pools" {
612612
}
613613

614614

615+
dynamic "linux_node_config" {
616+
for_each = length(merge(
617+
local.node_pools_linux_node_configs_sysctls["all"],
618+
local.node_pools_linux_node_configs_sysctls[each.value["name"]]
619+
)) != 0 ? [1] : []
620+
621+
content {
622+
sysctls = merge(
623+
local.node_pools_linux_node_configs_sysctls["all"],
624+
local.node_pools_linux_node_configs_sysctls[each.value["name"]]
625+
)
626+
}
627+
}
628+
615629
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
616630

617631
shielded_instance_config {
@@ -771,6 +785,7 @@ resource "google_container_node_pool" "windows_pools" {
771785
}
772786

773787

788+
774789
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
775790

776791
shielded_instance_config {

Diff for: modules/private-cluster-update-variant/variables.tf

+11
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,17 @@ variable "node_pools_metadata" {
191191
}
192192
}
193193

194+
variable "node_pools_linux_node_configs_sysctls" {
195+
type = map(map(string))
196+
description = "Map of maps containing linux node config sysctls by node-pool name"
197+
198+
# Default is being set in variables_defaults.tf
199+
default = {
200+
all = {}
201+
default-node-pool = {}
202+
}
203+
}
204+
194205
variable "enable_cost_allocation" {
195206
type = bool
196207
description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery"

Diff for: modules/private-cluster-update-variant/variables_defaults.tf

+10
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,14 @@ locals {
103103
),
104104
var.node_pools_oauth_scopes
105105
)
106+
107+
node_pools_linux_node_configs_sysctls = merge(
108+
{ all = {} },
109+
{ default-node-pool = {} },
110+
zipmap(
111+
[for node_pool in var.node_pools : node_pool["name"]],
112+
[for node_pool in var.node_pools : {}]
113+
),
114+
var.node_pools_linux_node_configs_sysctls
115+
)
106116
}

Diff for: modules/private-cluster-update-variant/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google = {
2323
source = "hashicorp/google"
24-
version = ">= 4.47.0, < 5.0"
24+
version = ">= 4.51.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

Diff for: modules/private-cluster/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ Then perform the following commands on the root folder:
199199
| node\_metadata | Specifies how node metadata is exposed to the workload running on the node | `string` | `"GKE_METADATA"` | no |
200200
| node\_pools | List of maps containing node pools | `list(map(any))` | <pre>[<br> {<br> "name": "default-node-pool"<br> }<br>]</pre> | no |
201201
| node\_pools\_labels | Map of maps containing node labels by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
202+
| node\_pools\_linux\_node\_configs\_sysctls | Map of maps containing linux node config sysctls by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
202203
| node\_pools\_metadata | Map of maps containing node metadata by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
203204
| node\_pools\_oauth\_scopes | Map of lists containing node oauth scopes by node-pool name | `map(list(string))` | <pre>{<br> "all": [<br> "https://www.googleapis.com/auth/cloud-platform"<br> ],<br> "default-node-pool": []<br>}</pre> | no |
204205
| node\_pools\_resource\_labels | Map of maps containing resource labels by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
@@ -323,7 +324,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
323324
- [kubectl](https://github.com/kubernetes/kubernetes/releases) 1.9.x
324325
#### Terraform and Plugins
325326
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
326-
- [Terraform Provider for GCP][terraform-provider-google] v4.47
327+
- [Terraform Provider for GCP][terraform-provider-google] v4.51
327328
#### gcloud
328329
Some submodules use the [terraform-google-gcloud](https://github.com/terraform-google-modules/terraform-google-gcloud) module. By default, this module assumes you already have gcloud installed in your $PATH.
329330
See the [module](https://github.com/terraform-google-modules/terraform-google-gcloud#downloading) documentation for more information.

Diff for: modules/private-cluster/cluster.tf

+15
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,20 @@ resource "google_container_node_pool" "pools" {
518518
}
519519

520520

521+
dynamic "linux_node_config" {
522+
for_each = length(merge(
523+
local.node_pools_linux_node_configs_sysctls["all"],
524+
local.node_pools_linux_node_configs_sysctls[each.value["name"]]
525+
)) != 0 ? [1] : []
526+
527+
content {
528+
sysctls = merge(
529+
local.node_pools_linux_node_configs_sysctls["all"],
530+
local.node_pools_linux_node_configs_sysctls[each.value["name"]]
531+
)
532+
}
533+
}
534+
521535
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
522536

523537
shielded_instance_config {
@@ -676,6 +690,7 @@ resource "google_container_node_pool" "windows_pools" {
676690
}
677691

678692

693+
679694
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
680695

681696
shielded_instance_config {

Diff for: modules/private-cluster/variables.tf

+11
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,17 @@ variable "node_pools_metadata" {
191191
}
192192
}
193193

194+
variable "node_pools_linux_node_configs_sysctls" {
195+
type = map(map(string))
196+
description = "Map of maps containing linux node config sysctls by node-pool name"
197+
198+
# Default is being set in variables_defaults.tf
199+
default = {
200+
all = {}
201+
default-node-pool = {}
202+
}
203+
}
204+
194205
variable "enable_cost_allocation" {
195206
type = bool
196207
description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery"

Diff for: modules/private-cluster/variables_defaults.tf

+10
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,14 @@ locals {
103103
),
104104
var.node_pools_oauth_scopes
105105
)
106+
107+
node_pools_linux_node_configs_sysctls = merge(
108+
{ all = {} },
109+
{ default-node-pool = {} },
110+
zipmap(
111+
[for node_pool in var.node_pools : node_pool["name"]],
112+
[for node_pool in var.node_pools : {}]
113+
),
114+
var.node_pools_linux_node_configs_sysctls
115+
)
106116
}

0 commit comments

Comments
 (0)