Skip to content

Commit 08009af

Browse files
IIBenIIbberriot
authored andcommitted
Take feedbacks
1 parent 2dfdb06 commit 08009af

File tree

28 files changed

+43
-33
lines changed

28 files changed

+43
-33
lines changed

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
| dns\_cache | The status of the NodeLocal DNSCache addon. | `bool` | `false` | no |
149149
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
150150
| enable\_cost\_allocation | 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 | `bool` | `false` | no |
151+
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |
151152
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
152153
| enable\_resource\_consumption\_export | Whether to enable resource consumption metering on this cluster. When enabled, a table will be created in the resource export BigQuery dataset to store resource consumption data. The resulting table can be joined with the resource usage table or with BigQuery billing export. | `bool` | `true` | no |
153154
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |

autogen/main/cluster.tf.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ resource "google_container_cluster" "primary" {
178178
}
179179
}
180180

181+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
182+
181183
{% if beta_cluster %}
182184
enable_intranode_visibility = var.enable_intranode_visibility
183-
enable_kubernetes_alpha = var.enable_kubernetes_alpha
184185
enable_tpu = var.enable_tpu
185186

186187
dynamic "pod_security_policy_config" {

autogen/main/main.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ locals {
224224
# BETA features
225225
cluster_istio_enabled = ! local.cluster_output_istio_disabled
226226
cluster_dns_cache_enabled = var.dns_cache
227+
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
227228
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
228229
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
229230
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
230-
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
231231

232232
# /BETA features
233233
{% endif %}

autogen/main/variables.tf.tmpl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@ variable "cluster_telemetry_type" {
333333
default = null
334334
}
335335
{% endif %}
336-
337336
variable "logging_service" {
338337
type = string
339338
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -670,17 +669,14 @@ variable "logging_enabled_components" {
670669
description = "List of services to monitor: SYSTEM_COMPONENTS, WORKLOADS. Empty list is default GKE configuration."
671670
default = []
672671
}
673-
{% endif %}
674-
675-
{% if beta_cluster %}
676-
{% if autopilot_cluster != true %}
677672

678673
variable "enable_kubernetes_alpha" {
679674
type = bool
680675
description = "Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days."
681676
default = false
682677
}
683-
{% endif %}
678+
{% endif %}
679+
{% if beta_cluster %}
684680
{% if autopilot_cluster != true %}
685681

686682
variable "istio" {

cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ resource "google_container_cluster" "primary" {
128128
}
129129
}
130130

131+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
132+
131133
dynamic "master_authorized_networks_config" {
132134
for_each = local.master_authorized_networks_config
133135
content {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ locals {
128128
# BETA features
129129
cluster_istio_enabled = !local.cluster_output_istio_disabled
130130
cluster_dns_cache_enabled = var.dns_cache
131+
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
131132
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
132133
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
133134
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
134-
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
135135

136136
# /BETA features
137137

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ variable "cluster_telemetry_type" {
208208
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
209209
default = null
210210
}
211-
212211
variable "logging_service" {
213212
type = string
214213
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -423,4 +422,3 @@ variable "timeouts" {
423422
}
424423
}
425424

426-

modules/beta-autopilot-public-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ locals {
127127
# BETA features
128128
cluster_istio_enabled = !local.cluster_output_istio_disabled
129129
cluster_dns_cache_enabled = var.dns_cache
130+
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
130131
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
131132
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
132133
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
133-
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
134134

135135
# /BETA features
136136

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ variable "cluster_telemetry_type" {
208208
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
209209
default = null
210210
}
211-
212211
variable "logging_service" {
213212
type = string
214213
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -393,4 +392,3 @@ variable "timeouts" {
393392
}
394393
}
395394

396-

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ resource "google_container_cluster" "primary" {
142142
}
143143
}
144144

145+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
146+
145147
enable_intranode_visibility = var.enable_intranode_visibility
146-
enable_kubernetes_alpha = var.enable_kubernetes_alpha
147148
enable_tpu = var.enable_tpu
148149

149150
dynamic "pod_security_policy_config" {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ locals {
183183
# BETA features
184184
cluster_istio_enabled = !local.cluster_output_istio_disabled
185185
cluster_dns_cache_enabled = var.dns_cache
186+
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
186187
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
187188
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
188189
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
189-
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
190190

191191
# /BETA features
192192

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ variable "cluster_telemetry_type" {
321321
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
322322
default = null
323323
}
324-
325324
variable "logging_service" {
326325
type = string
327326
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -642,7 +641,6 @@ variable "logging_enabled_components" {
642641
default = []
643642
}
644643

645-
646644
variable "enable_kubernetes_alpha" {
647645
type = bool
648646
description = "Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days."

modules/beta-private-cluster/cluster.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ resource "google_container_cluster" "primary" {
142142
}
143143
}
144144

145+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
146+
145147
enable_intranode_visibility = var.enable_intranode_visibility
146-
enable_kubernetes_alpha = var.enable_kubernetes_alpha
147148
enable_tpu = var.enable_tpu
148149

149150
dynamic "pod_security_policy_config" {

modules/beta-private-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ locals {
183183
# BETA features
184184
cluster_istio_enabled = !local.cluster_output_istio_disabled
185185
cluster_dns_cache_enabled = var.dns_cache
186+
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
186187
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
187188
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
188189
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
189-
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
190190

191191
# /BETA features
192192

modules/beta-private-cluster/variables.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ variable "cluster_telemetry_type" {
321321
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
322322
default = null
323323
}
324-
325324
variable "logging_service" {
326325
type = string
327326
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -642,7 +641,6 @@ variable "logging_enabled_components" {
642641
default = []
643642
}
644643

645-
646644
variable "enable_kubernetes_alpha" {
647645
type = bool
648646
description = "Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days."

modules/beta-public-cluster-update-variant/cluster.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ resource "google_container_cluster" "primary" {
142142
}
143143
}
144144

145+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
146+
145147
enable_intranode_visibility = var.enable_intranode_visibility
146-
enable_kubernetes_alpha = var.enable_kubernetes_alpha
147148
enable_tpu = var.enable_tpu
148149

149150
dynamic "pod_security_policy_config" {

modules/beta-public-cluster-update-variant/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ locals {
182182
# BETA features
183183
cluster_istio_enabled = !local.cluster_output_istio_disabled
184184
cluster_dns_cache_enabled = var.dns_cache
185+
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
185186
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
186187
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
187188
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
188-
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
189189

190190
# /BETA features
191191

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ variable "cluster_telemetry_type" {
321321
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
322322
default = null
323323
}
324-
325324
variable "logging_service" {
326325
type = string
327326
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -612,7 +611,6 @@ variable "logging_enabled_components" {
612611
default = []
613612
}
614613

615-
616614
variable "enable_kubernetes_alpha" {
617615
type = bool
618616
description = "Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days."

modules/beta-public-cluster/cluster.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ resource "google_container_cluster" "primary" {
142142
}
143143
}
144144

145+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
146+
145147
enable_intranode_visibility = var.enable_intranode_visibility
146-
enable_kubernetes_alpha = var.enable_kubernetes_alpha
147148
enable_tpu = var.enable_tpu
148149

149150
dynamic "pod_security_policy_config" {

modules/beta-public-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ locals {
182182
# BETA features
183183
cluster_istio_enabled = !local.cluster_output_istio_disabled
184184
cluster_dns_cache_enabled = var.dns_cache
185+
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
185186
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
186187
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
187188
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
188-
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
189189

190190
# /BETA features
191191

modules/beta-public-cluster/variables.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ variable "cluster_telemetry_type" {
321321
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
322322
default = null
323323
}
324-
325324
variable "logging_service" {
326325
type = string
327326
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -612,7 +611,6 @@ variable "logging_enabled_components" {
612611
default = []
613612
}
614613

615-
616614
variable "enable_kubernetes_alpha" {
617615
type = bool
618616
description = "Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days."

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ Then perform the following commands on the root folder:
177177
| dns\_cache | The status of the NodeLocal DNSCache addon. | `bool` | `false` | no |
178178
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
179179
| enable\_cost\_allocation | 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 | `bool` | `false` | no |
180+
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |
180181
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
181182
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | `bool` | `false` | no |
182183
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | `bool` | `false` | no |

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ resource "google_container_cluster" "primary" {
128128
}
129129
}
130130

131+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
132+
131133
dynamic "master_authorized_networks_config" {
132134
for_each = local.master_authorized_networks_config
133135
content {

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ variable "configure_ip_masq" {
303303
default = false
304304
}
305305

306-
307306
variable "logging_service" {
308307
type = string
309308
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -614,3 +613,8 @@ variable "logging_enabled_components" {
614613
default = []
615614
}
616615

616+
variable "enable_kubernetes_alpha" {
617+
type = bool
618+
description = "Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days."
619+
default = false
620+
}

modules/private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ Then perform the following commands on the root folder:
155155
| dns\_cache | The status of the NodeLocal DNSCache addon. | `bool` | `false` | no |
156156
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
157157
| enable\_cost\_allocation | 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 | `bool` | `false` | no |
158+
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |
158159
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
159160
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | `bool` | `false` | no |
160161
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | `bool` | `false` | no |

modules/private-cluster/cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ resource "google_container_cluster" "primary" {
128128
}
129129
}
130130

131+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
132+
131133
dynamic "master_authorized_networks_config" {
132134
for_each = local.master_authorized_networks_config
133135
content {

modules/private-cluster/variables.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ variable "configure_ip_masq" {
303303
default = false
304304
}
305305

306-
307306
variable "logging_service" {
308307
type = string
309308
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -614,3 +613,8 @@ variable "logging_enabled_components" {
614613
default = []
615614
}
616615

616+
variable "enable_kubernetes_alpha" {
617+
type = bool
618+
description = "Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days."
619+
default = false
620+
}

variables.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ variable "configure_ip_masq" {
303303
default = false
304304
}
305305

306-
307306
variable "logging_service" {
308307
type = string
309308
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
@@ -584,3 +583,8 @@ variable "logging_enabled_components" {
584583
default = []
585584
}
586585

586+
variable "enable_kubernetes_alpha" {
587+
type = bool
588+
description = "Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days."
589+
default = false
590+
}

0 commit comments

Comments
 (0)