Skip to content

Commit 4278f2c

Browse files
ericyzmuresanbharathkkb
authored
feat!: expose global master access in GA modules (#1421)
* feat: Add support for https_proxy parameter for the config_sync.git block (#1457) * Add support for https_proxy parameter for the config_sync.git block * Changes post make buid and make docker_generate_docs runs * switch default to true as next release is breaking * fmt Co-authored-by: Catalin Muresan <[email protected]> Co-authored-by: bharathkkb <[email protected]>
1 parent 1c43c9d commit 4278f2c

File tree

14 files changed

+36
-18
lines changed

14 files changed

+36
-18
lines changed

autogen/main/cluster.tf.tmpl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,14 +434,12 @@ resource "google_container_cluster" "primary" {
434434
enable_private_endpoint = private_cluster_config.value.enable_private_endpoint
435435
enable_private_nodes = private_cluster_config.value.enable_private_nodes
436436
master_ipv4_cidr_block = private_cluster_config.value.master_ipv4_cidr_block
437-
{% if beta_cluster %}
438437
dynamic "master_global_access_config" {
439438
for_each = var.master_global_access_enabled ? [var.master_global_access_enabled] : []
440439
content {
441440
enabled = master_global_access_config.value
442441
}
443442
}
444-
{% endif %}
445443
}
446444
}
447445
{% endif %}

autogen/main/variables.tf.tmpl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,16 +410,13 @@ variable "master_ipv4_cidr_block" {
410410
description = "(Beta) The IP range in CIDR notation to use for the hosted master network"
411411
default = "10.0.0.0/28"
412412
}
413-
{% if beta_cluster %}
414413

415414
variable "master_global_access_enabled" {
416415
type = bool
417-
description = "(Beta) Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
418-
416+
description = "Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
419417
default = true
420418
}
421419
{% endif %}
422-
{% endif %}
423420

424421
variable "dns_cache" {
425422
type = bool

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Then perform the following commands on the root folder:
108108
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
109109
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
110110
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
111-
| master\_global\_access\_enabled | (Beta) Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
111+
| master\_global\_access\_enabled | Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
112112
| master\_ipv4\_cidr\_block | (Beta) The IP range in CIDR notation to use for the hosted master network | `string` | `"10.0.0.0/28"` | no |
113113
| monitoring\_enable\_managed\_prometheus | (Beta) Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `false` | no |
114114
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | `string` | `"monitoring.googleapis.com/kubernetes"` | no |

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,8 @@ variable "master_ipv4_cidr_block" {
295295

296296
variable "master_global_access_enabled" {
297297
type = bool
298-
description = "(Beta) Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
299-
300-
default = true
298+
description = "Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
299+
default = true
301300
}
302301

303302
variable "dns_cache" {

modules/beta-private-cluster-update-variant/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Then perform the following commands on the root folder:
224224
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
225225
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
226226
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
227-
| master\_global\_access\_enabled | (Beta) Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
227+
| master\_global\_access\_enabled | Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
228228
| master\_ipv4\_cidr\_block | (Beta) The IP range in CIDR notation to use for the hosted master network | `string` | `"10.0.0.0/28"` | no |
229229
| monitoring\_enable\_managed\_prometheus | (Beta) Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `false` | no |
230230
| monitoring\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, WORKLOADS (provider version >= 3.89.0). Empty list is default GKE configuration. | `list(string)` | `[]` | no |

modules/beta-private-cluster-update-variant/variables.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,8 @@ variable "master_ipv4_cidr_block" {
398398

399399
variable "master_global_access_enabled" {
400400
type = bool
401-
description = "(Beta) Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
402-
403-
default = true
401+
description = "Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
402+
default = true
404403
}
405404

406405
variable "dns_cache" {

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Then perform the following commands on the root folder:
202202
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
203203
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
204204
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
205-
| master\_global\_access\_enabled | (Beta) Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
205+
| master\_global\_access\_enabled | Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
206206
| master\_ipv4\_cidr\_block | (Beta) The IP range in CIDR notation to use for the hosted master network | `string` | `"10.0.0.0/28"` | no |
207207
| monitoring\_enable\_managed\_prometheus | (Beta) Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `false` | no |
208208
| monitoring\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, WORKLOADS (provider version >= 3.89.0). Empty list is default GKE configuration. | `list(string)` | `[]` | no |

modules/beta-private-cluster/variables.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,8 @@ variable "master_ipv4_cidr_block" {
398398

399399
variable "master_global_access_enabled" {
400400
type = bool
401-
description = "(Beta) Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
402-
403-
default = true
401+
description = "Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
402+
default = true
404403
}
405404

406405
variable "dns_cache" {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Then perform the following commands on the root folder:
202202
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
203203
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
204204
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
205+
| master\_global\_access\_enabled | Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
205206
| master\_ipv4\_cidr\_block | (Beta) The IP range in CIDR notation to use for the hosted master network | `string` | `"10.0.0.0/28"` | no |
206207
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | `string` | `"monitoring.googleapis.com/kubernetes"` | no |
207208
| name | The name of the cluster (required) | `string` | n/a | yes |

modules/private-cluster-update-variant/cluster.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@ resource "google_container_cluster" "primary" {
274274
enable_private_endpoint = private_cluster_config.value.enable_private_endpoint
275275
enable_private_nodes = private_cluster_config.value.enable_private_nodes
276276
master_ipv4_cidr_block = private_cluster_config.value.master_ipv4_cidr_block
277+
dynamic "master_global_access_config" {
278+
for_each = var.master_global_access_enabled ? [var.master_global_access_enabled] : []
279+
content {
280+
enabled = master_global_access_config.value
281+
}
282+
}
277283
}
278284
}
279285

modules/private-cluster-update-variant/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,12 @@ variable "master_ipv4_cidr_block" {
372372
default = "10.0.0.0/28"
373373
}
374374

375+
variable "master_global_access_enabled" {
376+
type = bool
377+
description = "Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
378+
default = true
379+
}
380+
375381
variable "dns_cache" {
376382
type = bool
377383
description = "The status of the NodeLocal DNSCache addon."

modules/private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ Then perform the following commands on the root folder:
180180
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
181181
| maintenance\_start\_time | Time window specified for daily or recurring maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
182182
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
183+
| master\_global\_access\_enabled | Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint. | `bool` | `true` | no |
183184
| master\_ipv4\_cidr\_block | (Beta) The IP range in CIDR notation to use for the hosted master network | `string` | `"10.0.0.0/28"` | no |
184185
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | `string` | `"monitoring.googleapis.com/kubernetes"` | no |
185186
| name | The name of the cluster (required) | `string` | n/a | yes |

modules/private-cluster/cluster.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@ resource "google_container_cluster" "primary" {
274274
enable_private_endpoint = private_cluster_config.value.enable_private_endpoint
275275
enable_private_nodes = private_cluster_config.value.enable_private_nodes
276276
master_ipv4_cidr_block = private_cluster_config.value.master_ipv4_cidr_block
277+
dynamic "master_global_access_config" {
278+
for_each = var.master_global_access_enabled ? [var.master_global_access_enabled] : []
279+
content {
280+
enabled = master_global_access_config.value
281+
}
282+
}
277283
}
278284
}
279285

modules/private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,12 @@ variable "master_ipv4_cidr_block" {
372372
default = "10.0.0.0/28"
373373
}
374374

375+
variable "master_global_access_enabled" {
376+
type = bool
377+
description = "Whether the cluster master is accessible globally (from any region) or only within the same region as the private endpoint."
378+
default = true
379+
}
380+
375381
variable "dns_cache" {
376382
type = bool
377383
description = "The status of the NodeLocal DNSCache addon."

0 commit comments

Comments
 (0)