Skip to content

Commit a68fe69

Browse files
authored
feat!: add gcp_filestore_csi_driver_config to addons config (#1166)
1 parent 2867162 commit a68fe69

File tree

38 files changed

+118
-11
lines changed

38 files changed

+118
-11
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ module "gke" {
4545
http_load_balancing = false
4646
network_policy = false
4747
horizontal_pod_autoscaling = true
48+
filestore_csi_driver = false
4849
4950
node_pools = [
5051
{
@@ -143,6 +144,7 @@ Then perform the following commands on the root folder:
143144
| 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 |
144145
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
145146
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `false` | no |
147+
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
146148
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
147149
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
148150
| gcloud\_upgrade | Whether to upgrade gcloud at runtime | `bool` | `false` | no |

autogen/main/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ module "gke" {
7777
network_policy = false
7878
{% endif %}
7979
horizontal_pod_autoscaling = true
80+
filestore_csi_driver = false
8081
{% if private_cluster %}
8182
enable_private_endpoint = true
8283
enable_private_nodes = true

autogen/main/cluster.tf.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,15 @@ resource "google_container_cluster" "primary" {
185185
horizontal_pod_autoscaling {
186186
disabled = !var.horizontal_pod_autoscaling
187187
}
188+
188189
{% if autopilot_cluster != true %}
189190
network_policy_config {
190191
disabled = !var.network_policy
191192
}
193+
194+
gcp_filestore_csi_driver_config {
195+
enabled = var.filestore_csi_driver
196+
}
192197
{% endif %}
193198
{% if beta_cluster and autopilot_cluster != true %}
194199

autogen/main/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ variable "remove_default_node_pool" {
162162
description = "Remove default node pool while setting up the cluster"
163163
default = false
164164
}
165+
166+
variable "filestore_csi_driver" {
167+
type = bool
168+
description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes"
169+
default = false
170+
}
165171
{% endif %}
166172

167173
variable "disable_legacy_metadata_endpoints" {

autogen/main/versions.tf.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ terraform {
2424
required_providers {
2525
google-beta = {
2626
source = "hashicorp/google-beta"
27-
version = ">= 4.6.0, < 5.0"
27+
version = ">= 4.10.0, < 5.0"
2828
}
2929
kubernetes = {
3030
source = "hashicorp/kubernetes"
@@ -38,7 +38,7 @@ terraform {
3838
required_providers {
3939
google = {
4040
source = "hashicorp/google"
41-
version = ">= 4.0.0, < 5.0"
41+
version = ">= 4.10.0, < 5.0"
4242
}
4343
kubernetes = {
4444
source = "hashicorp/kubernetes"

cluster.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,14 @@ resource "google_container_cluster" "primary" {
106106
horizontal_pod_autoscaling {
107107
disabled = !var.horizontal_pod_autoscaling
108108
}
109+
109110
network_policy_config {
110111
disabled = !var.network_policy
111112
}
113+
114+
gcp_filestore_csi_driver_config {
115+
enabled = var.filestore_csi_driver
116+
}
112117
}
113118

114119
datapath_provider = var.datapath_provider

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ module "gke" {
4646
ip_range_pods = "us-central1-01-gke-01-pods"
4747
ip_range_services = "us-central1-01-gke-01-services"
4848
horizontal_pod_autoscaling = true
49+
filestore_csi_driver = false
4950
enable_private_endpoint = true
5051
enable_private_nodes = true
5152
master_ipv4_cidr_block = "10.0.0.0/28"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ resource "google_container_cluster" "primary" {
8686
horizontal_pod_autoscaling {
8787
disabled = !var.horizontal_pod_autoscaling
8888
}
89+
8990
}
9091

9192
datapath_provider = var.datapath_provider

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.6.0, < 5.0"
24+
version = ">= 4.10.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ module "gke" {
4343
ip_range_pods = "us-central1-01-gke-01-pods"
4444
ip_range_services = "us-central1-01-gke-01-services"
4545
horizontal_pod_autoscaling = true
46+
filestore_csi_driver = false
4647
enable_autopilot = true
4748
4849
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ resource "google_container_cluster" "primary" {
8686
horizontal_pod_autoscaling {
8787
disabled = !var.horizontal_pod_autoscaling
8888
}
89+
8990
}
9091

9192
datapath_provider = var.datapath_provider

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.6.0, < 5.0"
24+
version = ">= 4.10.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ module "gke" {
7070
http_load_balancing = false
7171
network_policy = false
7272
horizontal_pod_autoscaling = true
73+
filestore_csi_driver = false
7374
enable_private_endpoint = true
7475
enable_private_nodes = true
7576
master_ipv4_cidr_block = "10.0.0.0/28"
@@ -192,6 +193,7 @@ Then perform the following commands on the root folder:
192193
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
193194
| enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no |
194195
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `false` | no |
196+
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
195197
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
196198
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
197199
| gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `false` | no |

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,15 @@ resource "google_container_cluster" "primary" {
157157
horizontal_pod_autoscaling {
158158
disabled = !var.horizontal_pod_autoscaling
159159
}
160+
160161
network_policy_config {
161162
disabled = !var.network_policy
162163
}
163164

165+
gcp_filestore_csi_driver_config {
166+
enabled = var.filestore_csi_driver
167+
}
168+
164169
istio_config {
165170
disabled = !var.istio
166171
auth = var.istio_auth

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ variable "remove_default_node_pool" {
160160
default = false
161161
}
162162

163+
variable "filestore_csi_driver" {
164+
type = bool
165+
description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes"
166+
default = false
167+
}
168+
163169
variable "disable_legacy_metadata_endpoints" {
164170
type = bool
165171
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.6.0, < 5.0"
24+
version = ">= 4.10.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

modules/beta-private-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ module "gke" {
4848
http_load_balancing = false
4949
network_policy = false
5050
horizontal_pod_autoscaling = true
51+
filestore_csi_driver = false
5152
enable_private_endpoint = true
5253
enable_private_nodes = true
5354
master_ipv4_cidr_block = "10.0.0.0/28"
@@ -170,6 +171,7 @@ Then perform the following commands on the root folder:
170171
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
171172
| enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no |
172173
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `false` | no |
174+
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
173175
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
174176
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
175177
| gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `false` | no |

modules/beta-private-cluster/cluster.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,15 @@ resource "google_container_cluster" "primary" {
157157
horizontal_pod_autoscaling {
158158
disabled = !var.horizontal_pod_autoscaling
159159
}
160+
160161
network_policy_config {
161162
disabled = !var.network_policy
162163
}
163164

165+
gcp_filestore_csi_driver_config {
166+
enabled = var.filestore_csi_driver
167+
}
168+
164169
istio_config {
165170
disabled = !var.istio
166171
auth = var.istio_auth

modules/beta-private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ variable "remove_default_node_pool" {
160160
default = false
161161
}
162162

163+
variable "filestore_csi_driver" {
164+
type = bool
165+
description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes"
166+
default = false
167+
}
168+
163169
variable "disable_legacy_metadata_endpoints" {
164170
type = bool
165171
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."

modules/beta-private-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.6.0, < 5.0"
24+
version = ">= 4.10.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ module "gke" {
6767
http_load_balancing = false
6868
network_policy = false
6969
horizontal_pod_autoscaling = true
70+
filestore_csi_driver = false
7071
istio = true
7172
cloudrun = true
7273
dns_cache = false
@@ -183,6 +184,7 @@ Then perform the following commands on the root folder:
183184
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
184185
| enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no |
185186
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `false` | no |
187+
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
186188
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
187189
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
188190
| gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `false` | no |

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,15 @@ resource "google_container_cluster" "primary" {
157157
horizontal_pod_autoscaling {
158158
disabled = !var.horizontal_pod_autoscaling
159159
}
160+
160161
network_policy_config {
161162
disabled = !var.network_policy
162163
}
163164

165+
gcp_filestore_csi_driver_config {
166+
enabled = var.filestore_csi_driver
167+
}
168+
164169
istio_config {
165170
disabled = !var.istio
166171
auth = var.istio_auth

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ variable "remove_default_node_pool" {
160160
default = false
161161
}
162162

163+
variable "filestore_csi_driver" {
164+
type = bool
165+
description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes"
166+
default = false
167+
}
168+
163169
variable "disable_legacy_metadata_endpoints" {
164170
type = bool
165171
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.6.0, < 5.0"
24+
version = ">= 4.10.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

modules/beta-public-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ module "gke" {
4545
http_load_balancing = false
4646
network_policy = false
4747
horizontal_pod_autoscaling = true
48+
filestore_csi_driver = false
4849
istio = true
4950
cloudrun = true
5051
dns_cache = false
@@ -161,6 +162,7 @@ Then perform the following commands on the root folder:
161162
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
162163
| enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no |
163164
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `false` | no |
165+
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
164166
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
165167
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
166168
| gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `false` | no |

modules/beta-public-cluster/cluster.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,15 @@ resource "google_container_cluster" "primary" {
157157
horizontal_pod_autoscaling {
158158
disabled = !var.horizontal_pod_autoscaling
159159
}
160+
160161
network_policy_config {
161162
disabled = !var.network_policy
162163
}
163164

165+
gcp_filestore_csi_driver_config {
166+
enabled = var.filestore_csi_driver
167+
}
168+
164169
istio_config {
165170
disabled = !var.istio
166171
auth = var.istio_auth

modules/beta-public-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ variable "remove_default_node_pool" {
160160
default = false
161161
}
162162

163+
variable "filestore_csi_driver" {
164+
type = bool
165+
description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes"
166+
default = false
167+
}
168+
163169
variable "disable_legacy_metadata_endpoints" {
164170
type = bool
165171
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."

modules/beta-public-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google-beta = {
2323
source = "hashicorp/google-beta"
24-
version = ">= 4.6.0, < 5.0"
24+
version = ">= 4.10.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ module "gke" {
7070
http_load_balancing = false
7171
network_policy = false
7272
horizontal_pod_autoscaling = true
73+
filestore_csi_driver = false
7374
enable_private_endpoint = true
7475
enable_private_nodes = true
7576
master_ipv4_cidr_block = "10.0.0.0/28"
@@ -174,6 +175,7 @@ Then perform the following commands on the root folder:
174175
| 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 |
175176
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
176177
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `false` | no |
178+
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
177179
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
178180
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
179181
| gcloud\_upgrade | Whether to upgrade gcloud at runtime | `bool` | `false` | no |

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,14 @@ resource "google_container_cluster" "primary" {
106106
horizontal_pod_autoscaling {
107107
disabled = !var.horizontal_pod_autoscaling
108108
}
109+
109110
network_policy_config {
110111
disabled = !var.network_policy
111112
}
113+
114+
gcp_filestore_csi_driver_config {
115+
enabled = var.filestore_csi_driver
116+
}
112117
}
113118

114119
datapath_provider = var.datapath_provider

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ variable "remove_default_node_pool" {
149149
default = false
150150
}
151151

152+
variable "filestore_csi_driver" {
153+
type = bool
154+
description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes"
155+
default = false
156+
}
157+
152158
variable "disable_legacy_metadata_endpoints" {
153159
type = bool
154160
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."

0 commit comments

Comments
 (0)