Skip to content

Commit cb3c136

Browse files
committed
add support for pod_cidr_overprovision_config
Signed-off-by: drfaust92 <[email protected]>
1 parent 3a1945f commit cb3c136

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+314
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ Then perform the following commands on the root folder:
252252
| notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no |
253253
| notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no |
254254
| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no |
255+
| pod\_cidr\_overprovision\_config | Configuration for cluster level pod cidr overprovision. | `object({ disabled = bool })` | <pre>{<br> "disabled": null<br>}</pre> | no |
255256
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
256257
| ray\_operator\_config | The Ray Operator Addon configuration for this cluster. | <pre>object({<br> enabled = bool<br> logging_enabled = optional(bool, false)<br> monitoring_enabled = optional(bool, false)<br> })</pre> | <pre>{<br> "enabled": false,<br> "logging_enabled": false,<br> "monitoring_enabled": false<br>}</pre> | no |
257258
| rbac\_binding\_config | RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. | <pre>object({<br> enable_insecure_binding_system_unauthenticated = optional(bool, null)<br> enable_insecure_binding_system_authenticated = optional(bool, null)<br> })</pre> | <pre>{<br> "enable_insecure_binding_system_authenticated": null,<br> "enable_insecure_binding_system_unauthenticated": null<br>}</pre> | no |
@@ -403,6 +404,7 @@ The node_pools variable takes the following parameters:
403404
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
404405
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
405406
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
407+
| pod_cidr_overprovision_config | Configuration for node-pool level pod cidr overprovision. If not set, the cluster level setting will be inherited. | | Optional |
406408
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. Valid values are: "TIER_1" and "TIER_UNSPECIFIED". | | Optional |
407409
| consume_reservation_type | The type of reservation consumption. Accepted values are: "UNSPECIFIED": Default value (should not be specified). "NO_RESERVATION": Do not consume from any reserved capacity, "ANY_RESERVATION": Consume any reservation available, "SPECIFIC_RESERVATION": Must consume from a specific reservation. Must specify key value fields for specifying the reservations. | | Optional |
408410
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |

autogen/main/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ The node_pools variable takes the following parameters:
280280
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
281281
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
282282
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
283+
| pod_cidr_overprovision_config | Configuration for node-pool level pod cidr overprovision. If not set, the cluster level setting will be inherited. | | Optional |
283284
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. Valid values are: "TIER_1" and "TIER_UNSPECIFIED". | | Optional |
284285
| consume_reservation_type | The type of reservation consumption. Accepted values are: "UNSPECIFIED": Default value (should not be specified). "NO_RESERVATION": Do not consume from any reserved capacity, "ANY_RESERVATION": Consume any reservation available, "SPECIFIC_RESERVATION": Must consume from a specific reservation. Must specify key value fields for specifying the reservations. | | Optional |
285286
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |

autogen/main/cluster.tf.tmpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,12 @@ resource "google_container_cluster" "primary" {
553553
}
554554
}
555555
stack_type = var.stack_type
556+
dynamic "pod_cidr_overprovision_config" {
557+
for_each = var.pod_cidr_overprovision_config
558+
content {
559+
disabled = var.pod_cidr_overprovision_config.disabled
560+
}
561+
}
556562
}
557563

558564
maintenance_policy {
@@ -1038,6 +1044,13 @@ resource "google_container_node_pool" "windows_pools" {
10381044
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
10391045
{% endif %}
10401046

1047+
dynamic "pod_cidr_overprovision_config" {
1048+
for_each = lookup(network_config.value, "pod_cidr_overprovision_config", "") != "" ? [1] : []
1049+
content {
1050+
disabled = lookup(network_config.value, "pod_cidr_overprovision_config", null)
1051+
}
1052+
}
1053+
10411054
dynamic "network_performance_config" {
10421055
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
10431056
content {

autogen/main/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ variable "additional_ip_ranges_config" {
180180
default = []
181181
}
182182

183+
variable "pod_cidr_overprovision_config" {
184+
type = object({ disabled = bool })
185+
description = "Configuration for cluster level pod cidr overprovision."
186+
default = { disabled = null }
187+
}
188+
183189
variable "ip_range_services" {
184190
type = string
185191
description = "The _name_ of the secondary subnet range to use for services. If not provided, the default `34.118.224.0/20` range will be used."

cluster.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,12 @@ resource "google_container_cluster" "primary" {
421421
}
422422
}
423423
stack_type = var.stack_type
424+
dynamic "pod_cidr_overprovision_config" {
425+
for_each = var.pod_cidr_overprovision_config
426+
content {
427+
disabled = var.pod_cidr_overprovision_config.disabled
428+
}
429+
}
424430
}
425431

426432
maintenance_policy {
@@ -739,6 +745,13 @@ resource "google_container_node_pool" "pools" {
739745
pod_range = lookup(network_config.value, "pod_range", null)
740746
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
741747

748+
dynamic "pod_cidr_overprovision_config" {
749+
for_each = lookup(network_config.value, "pod_cidr_overprovision_config", "") != "" ? [1] : []
750+
content {
751+
disabled = lookup(network_config.value, "pod_cidr_overprovision_config", null)
752+
}
753+
}
754+
742755
dynamic "network_performance_config" {
743756
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
744757
content {
@@ -1105,6 +1118,13 @@ resource "google_container_node_pool" "windows_pools" {
11051118
pod_range = lookup(network_config.value, "pod_range", null)
11061119
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
11071120

1121+
dynamic "pod_cidr_overprovision_config" {
1122+
for_each = lookup(network_config.value, "pod_cidr_overprovision_config", "") != "" ? [1] : []
1123+
content {
1124+
disabled = lookup(network_config.value, "pod_cidr_overprovision_config", null)
1125+
}
1126+
}
1127+
11081128
dynamic "network_performance_config" {
11091129
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
11101130
content {

metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,9 @@ spec:
366366
parallelstore_csi_driver:
367367
name: parallelstore_csi_driver
368368
title: Parallelstore Csi Driver
369+
pod_cidr_overprovision_config:
370+
name: pod_cidr_overprovision_config
371+
title: Pod Cidr Overprovision Config
369372
project_id:
370373
name: project_id
371374
title: Project Id

metadata.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ spec:
263263
description: the configuration for individual additional subnetworks attached to the cluster
264264
varType: list(object({ subnetwork = string, pod_ipv4_range_names = list(string) }))
265265
defaultValue: []
266+
- name: pod_cidr_overprovision_config
267+
description: Configuration for cluster level pod cidr overprovision.
268+
varType: object({ disabled = bool })
269+
defaultValue:
270+
disabled: null
266271
- name: ip_range_services
267272
description: The _name_ of the secondary subnet range to use for services. If not provided, the default `34.118.224.0/20` range will be used.
268273
varType: string

modules/beta-autopilot-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ Then perform the following commands on the root folder:
148148
| node\_pools\_cgroup\_mode | Specifies the Linux cgroup mode for autopilot Kubernetes nodes in the cluster. Accepted values are `CGROUP_MODE_UNSPECIFIED`, `CGROUP_MODE_V1`, and `CGROUP_MODE_V2`, which determine the control group hierarchy used for resource management. | `string` | `null` | no |
149149
| notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no |
150150
| notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no |
151+
| pod\_cidr\_overprovision\_config | Configuration for cluster level pod cidr overprovision. | `object({ disabled = bool })` | <pre>{<br> "disabled": null<br>}</pre> | no |
151152
| private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no |
152153
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
153154
| ray\_operator\_config | The Ray Operator Addon configuration for this cluster. | <pre>object({<br> enabled = bool<br> logging_enabled = optional(bool, false)<br> monitoring_enabled = optional(bool, false)<br> })</pre> | <pre>{<br> "enabled": false,<br> "logging_enabled": false,<br> "monitoring_enabled": false<br>}</pre> | no |

modules/beta-autopilot-private-cluster/cluster.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,12 @@ resource "google_container_cluster" "primary" {
322322
}
323323
}
324324
stack_type = var.stack_type
325+
dynamic "pod_cidr_overprovision_config" {
326+
for_each = var.pod_cidr_overprovision_config
327+
content {
328+
disabled = var.pod_cidr_overprovision_config.disabled
329+
}
330+
}
325331
}
326332

327333
maintenance_policy {

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ spec:
268268
notification_filter_event_type:
269269
name: notification_filter_event_type
270270
title: Notification Filter Event Type
271+
pod_cidr_overprovision_config:
272+
name: pod_cidr_overprovision_config
273+
title: Pod Cidr Overprovision Config
271274
private_endpoint_subnetwork:
272275
name: private_endpoint_subnetwork
273276
title: Private Endpoint Subnetwork

0 commit comments

Comments
 (0)