Skip to content

Commit a5ce97e

Browse files
committed
feat(safer-cluster): add some missing variables
- node_pools_resource_manager_tags - node_pools_cgroup_mode - node_pools_hugepage_size_2m - enable_secret_manager_addon
1 parent 8f610c7 commit a5ce97e

File tree

19 files changed

+259
-21
lines changed

19 files changed

+259
-21
lines changed

autogen/safer-cluster/main.tf.tmpl

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,16 @@ module "gke" {
8989
// If removing the default node pool, initial_node_count should be at least 1.
9090
initial_node_count = (var.initial_node_count == 0) ? 1 : var.initial_node_count
9191

92-
node_pools = var.node_pools
93-
windows_node_pools = var.windows_node_pools
94-
node_pools_labels = var.node_pools_labels
95-
node_pools_resource_labels = var.node_pools_resource_labels
96-
node_pools_metadata = var.node_pools_metadata
97-
node_pools_taints = var.node_pools_taints
98-
node_pools_tags = var.node_pools_tags
92+
node_pools = var.node_pools
93+
windows_node_pools = var.windows_node_pools
94+
node_pools_labels = var.node_pools_labels
95+
node_pools_resource_labels = var.node_pools_resource_labels
96+
node_pools_resource_manager_tags = var.node_pools_resource_manager_tags
97+
node_pools_metadata = var.node_pools_metadata
98+
node_pools_cgroup_mode = var.node_pools_cgroup_mode
99+
node_pools_hugepage_size_2m = var.node_pools_hugepage_size_2m
100+
node_pools_taints = var.node_pools_taints
101+
node_pools_tags = var.node_pools_tags
99102

100103
node_pools_oauth_scopes = var.node_pools_oauth_scopes
101104

@@ -216,6 +219,8 @@ module "gke" {
216219

217220
enable_gcfs = var.enable_gcfs
218221

222+
enable_secret_manager_addon = var.enable_secret_manager_addon
223+
219224
// Enabling vulnerability and audit for workloads
220225
workload_vulnerability_mode = var.workload_vulnerability_mode
221226
workload_config_audit_mode = var.workload_config_audit_mode

autogen/safer-cluster/variables.tf.tmpl

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ variable "node_pools_resource_labels" {
185185
}
186186
}
187187

188+
variable "node_pools_resource_manager_tags" {
189+
type = map(map(string))
190+
description = "Map of maps containing resource manager tags by node-pool name"
191+
192+
default = {
193+
all = {}
194+
default-node-pool = {}
195+
}
196+
}
197+
188198
variable "node_pools_metadata" {
189199
type = map(map(string))
190200
description = "Map of maps containing node metadata by node-pool name"
@@ -195,6 +205,28 @@ variable "node_pools_metadata" {
195205
}
196206
}
197207

208+
variable "node_pools_cgroup_mode" {
209+
type = map(string)
210+
description = "Map of strings containing cgroup node config by node-pool name"
211+
212+
# Default is being set in variables_defaults.tf
213+
default = {
214+
all = ""
215+
default-node-pool = ""
216+
}
217+
}
218+
219+
variable "node_pools_hugepage_size_2m" {
220+
type = map(string)
221+
description = "Map of strings containing hugepage size 2m node config by node-pool name"
222+
223+
# Default is being set in variables_defaults.tf
224+
default = {
225+
all = ""
226+
default-node-pool = ""
227+
}
228+
}
229+
198230
variable "node_pools_taints" {
199231
type = map(list(object({ key = string, value = string, effect = string })))
200232
description = "Map of lists containing node taints by node-pool name"
@@ -540,6 +572,12 @@ variable "enable_gcfs" {
540572
default = false
541573
}
542574

575+
variable "enable_secret_manager_addon" {
576+
description = "Enable the Secret Manager add-on for this cluster"
577+
type = bool
578+
default = false
579+
}
580+
543581
variable "enable_mesh_certificates" {
544582
type = bool
545583
default = false

metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ spec:
285285
master_authorized_networks:
286286
name: master_authorized_networks
287287
title: Master Authorized Networks
288+
monitoring_auto_monitoring_config_scope:
289+
name: monitoring_auto_monitoring_config_scope
290+
title: Monitoring Auto Monitoring Config Scope
288291
monitoring_enable_managed_prometheus:
289292
name: monitoring_enable_managed_prometheus
290293
title: Monitoring Enable Managed Prometheus

modules/beta-private-cluster-update-variant/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ spec:
325325
master_ipv4_cidr_block:
326326
name: master_ipv4_cidr_block
327327
title: Master Ipv4 Cidr Block
328+
monitoring_auto_monitoring_config_scope:
329+
name: monitoring_auto_monitoring_config_scope
330+
title: Monitoring Auto Monitoring Config Scope
328331
monitoring_enable_managed_prometheus:
329332
name: monitoring_enable_managed_prometheus
330333
title: Monitoring Enable Managed Prometheus

modules/beta-private-cluster/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ spec:
325325
master_ipv4_cidr_block:
326326
name: master_ipv4_cidr_block
327327
title: Master Ipv4 Cidr Block
328+
monitoring_auto_monitoring_config_scope:
329+
name: monitoring_auto_monitoring_config_scope
330+
title: Monitoring Auto Monitoring Config Scope
328331
monitoring_enable_managed_prometheus:
329332
name: monitoring_enable_managed_prometheus
330333
title: Monitoring Enable Managed Prometheus

modules/beta-public-cluster-update-variant/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ spec:
310310
master_authorized_networks:
311311
name: master_authorized_networks
312312
title: Master Authorized Networks
313+
monitoring_auto_monitoring_config_scope:
314+
name: monitoring_auto_monitoring_config_scope
315+
title: Monitoring Auto Monitoring Config Scope
313316
monitoring_enable_managed_prometheus:
314317
name: monitoring_enable_managed_prometheus
315318
title: Monitoring Enable Managed Prometheus

modules/beta-public-cluster/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ spec:
310310
master_authorized_networks:
311311
name: master_authorized_networks
312312
title: Master Authorized Networks
313+
monitoring_auto_monitoring_config_scope:
314+
name: monitoring_auto_monitoring_config_scope
315+
title: Monitoring Auto Monitoring Config Scope
313316
monitoring_enable_managed_prometheus:
314317
name: monitoring_enable_managed_prometheus
315318
title: Monitoring Enable Managed Prometheus

modules/private-cluster-update-variant/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ spec:
301301
master_ipv4_cidr_block:
302302
name: master_ipv4_cidr_block
303303
title: Master Ipv4 Cidr Block
304+
monitoring_auto_monitoring_config_scope:
305+
name: monitoring_auto_monitoring_config_scope
306+
title: Monitoring Auto Monitoring Config Scope
304307
monitoring_enable_managed_prometheus:
305308
name: monitoring_enable_managed_prometheus
306309
title: Monitoring Enable Managed Prometheus

modules/private-cluster/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ spec:
301301
master_ipv4_cidr_block:
302302
name: master_ipv4_cidr_block
303303
title: Master Ipv4 Cidr Block
304+
monitoring_auto_monitoring_config_scope:
305+
name: monitoring_auto_monitoring_config_scope
306+
title: Monitoring Auto Monitoring Config Scope
304307
monitoring_enable_managed_prometheus:
305308
name: monitoring_enable_managed_prometheus
306309
title: Monitoring Enable Managed Prometheus

modules/safer-cluster-update-variant/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ For simplicity, we suggest using `roles/container.admin` and
227227
| enable\_mesh\_certificates | Controls the issuance of workload mTLS certificates. When enabled the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster. Requires Workload Identity. | `bool` | `false` | no |
228228
| enable\_pod\_security\_policy | enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created. | `bool` | `false` | no |
229229
| enable\_private\_endpoint | When true, the cluster's private endpoint is used as the cluster endpoint and access through the public endpoint is disabled. When false, either endpoint can be used. This field only applies to private clusters, when enable\_private\_nodes is true | `bool` | `true` | no |
230+
| enable\_secret\_manager\_addon | Enable the Secret Manager add-on for this cluster | `bool` | `false` | no |
230231
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster. | `bool` | `true` | no |
231232
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `false` | no |
232233
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
@@ -261,10 +262,13 @@ For simplicity, we suggest using `roles/container.admin` and
261262
| network | The VPC network to host the cluster in | `string` | n/a | yes |
262263
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | `string` | `""` | no |
263264
| node\_pools | List of maps containing node pools | `list(map(string))` | <pre>[<br> {<br> "name": "default-node-pool"<br> }<br>]</pre> | no |
265+
| node\_pools\_cgroup\_mode | Map of strings containing cgroup node config by node-pool name | `map(string)` | <pre>{<br> "all": "",<br> "default-node-pool": ""<br>}</pre> | no |
266+
| node\_pools\_hugepage\_size\_2m | Map of strings containing hugepage size 2m node config by node-pool name | `map(string)` | <pre>{<br> "all": "",<br> "default-node-pool": ""<br>}</pre> | no |
264267
| 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 |
265268
| 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 |
266269
| 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 |
267270
| 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 |
271+
| node\_pools\_resource\_manager\_tags | Map of maps containing resource manager tags by node-pool name | `map(map(string))` | <pre>{<br> "all": {},<br> "default-node-pool": {}<br>}</pre> | no |
268272
| node\_pools\_tags | Map of lists containing node network tags by node-pool name | `map(list(string))` | <pre>{<br> "all": [],<br> "default-node-pool": []<br>}</pre> | no |
269273
| node\_pools\_taints | Map of lists containing node taints by node-pool name | `map(list(object({ key = string, value = string, effect = string })))` | <pre>{<br> "all": [],<br> "default-node-pool": []<br>}</pre> | no |
270274
| notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no |

0 commit comments

Comments
 (0)