Skip to content

Commit f6f7370

Browse files
authored
feat: Add enable_kubernetes_alpha flag for beta clusters (#437)
1 parent 8571f61 commit f6f7370

File tree

11 files changed

+31
-0
lines changed

11 files changed

+31
-0
lines changed

autogen/main/cluster.tf.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ resource "google_container_cluster" "primary" {
8383
enable_intranode_visibility = var.enable_intranode_visibility
8484
default_max_pods_per_node = var.default_max_pods_per_node
8585
enable_shielded_nodes = var.enable_shielded_nodes
86+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
8687

8788
vertical_pod_autoscaling {
8889
enabled = var.enable_vertical_pod_autoscaling

autogen/main/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ variable "node_pools_metadata" {
190190
}
191191
{% if beta_cluster %}
192192

193+
variable "enable_kubernetes_alpha" {
194+
type = bool
195+
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."
196+
default = false
197+
}
198+
193199
variable "cluster_autoscaling" {
194200
type = object({
195201
enabled = bool

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ Then perform the following commands on the root folder:
171171
| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | bool | `"true"` | no |
172172
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | string | `"false"` | no |
173173
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | bool | `"false"` | no |
174+
| 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 |
174175
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | bool | `"false"` | no |
175176
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | bool | `"false"` | no |
176177
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | bool | `"false"` | no |

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ resource "google_container_cluster" "primary" {
7272
enable_intranode_visibility = var.enable_intranode_visibility
7373
default_max_pods_per_node = var.default_max_pods_per_node
7474
enable_shielded_nodes = var.enable_shielded_nodes
75+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
7576

7677
vertical_pod_autoscaling {
7778
enabled = var.enable_vertical_pod_autoscaling

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ variable "node_pools_metadata" {
187187
}
188188
}
189189

190+
variable "enable_kubernetes_alpha" {
191+
type = bool
192+
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."
193+
default = false
194+
}
195+
190196
variable "cluster_autoscaling" {
191197
type = object({
192198
enabled = bool

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ Then perform the following commands on the root folder:
149149
| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | bool | `"true"` | no |
150150
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | string | `"false"` | no |
151151
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | bool | `"false"` | no |
152+
| 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 |
152153
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | bool | `"false"` | no |
153154
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | bool | `"false"` | no |
154155
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | bool | `"false"` | no |

modules/beta-private-cluster/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ resource "google_container_cluster" "primary" {
7272
enable_intranode_visibility = var.enable_intranode_visibility
7373
default_max_pods_per_node = var.default_max_pods_per_node
7474
enable_shielded_nodes = var.enable_shielded_nodes
75+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
7576

7677
vertical_pod_autoscaling {
7778
enabled = var.enable_vertical_pod_autoscaling

modules/beta-private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ variable "node_pools_metadata" {
187187
}
188188
}
189189

190+
variable "enable_kubernetes_alpha" {
191+
type = bool
192+
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."
193+
default = false
194+
}
195+
190196
variable "cluster_autoscaling" {
191197
type = object({
192198
enabled = bool

modules/beta-public-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Then perform the following commands on the root folder:
130130
| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | bool | `"true"` | no |
131131
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | string | `"false"` | no |
132132
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | bool | `"false"` | no |
133+
| 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 |
133134
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | bool | `"false"` | no |
134135
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | bool | `"false"` | no |
135136
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no |

modules/beta-public-cluster/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ resource "google_container_cluster" "primary" {
7272
enable_intranode_visibility = var.enable_intranode_visibility
7373
default_max_pods_per_node = var.default_max_pods_per_node
7474
enable_shielded_nodes = var.enable_shielded_nodes
75+
enable_kubernetes_alpha = var.enable_kubernetes_alpha
7576

7677
vertical_pod_autoscaling {
7778
enabled = var.enable_vertical_pod_autoscaling

0 commit comments

Comments
 (0)