From 40ef1a178281ab967ed60ddf1a28304a76e8982d Mon Sep 17 00:00:00 2001 From: Laura Seidler <42136707+lauraseidler@users.noreply.github.com> Date: Tue, 12 Apr 2022 18:03:58 +0200 Subject: [PATCH] feat: Add `filestore_csi_driver` option for safer cluster variants (#1176) Co-authored-by: Bharath KKB --- autogen/safer-cluster/main.tf.tmpl | 3 ++- autogen/safer-cluster/variables.tf.tmpl | 6 ++++++ modules/safer-cluster-update-variant/README.md | 1 + modules/safer-cluster-update-variant/main.tf | 3 ++- modules/safer-cluster-update-variant/variables.tf | 6 ++++++ modules/safer-cluster/README.md | 1 + modules/safer-cluster/main.tf | 3 ++- modules/safer-cluster/variables.tf | 6 ++++++ 8 files changed, 26 insertions(+), 3 deletions(-) diff --git a/autogen/safer-cluster/main.tf.tmpl b/autogen/safer-cluster/main.tf.tmpl index 79d6807d0..519bbc286 100644 --- a/autogen/safer-cluster/main.tf.tmpl +++ b/autogen/safer-cluster/main.tf.tmpl @@ -169,7 +169,8 @@ module "gke" { skip_provisioners = var.skip_provisioners - gce_pd_csi_driver = var.gce_pd_csi_driver + gce_pd_csi_driver = var.gce_pd_csi_driver + filestore_csi_driver = var.filestore_csi_driver notification_config_topic = var.notification_config_topic } diff --git a/autogen/safer-cluster/variables.tf.tmpl b/autogen/safer-cluster/variables.tf.tmpl index 621016886..dcc677fe2 100644 --- a/autogen/safer-cluster/variables.tf.tmpl +++ b/autogen/safer-cluster/variables.tf.tmpl @@ -346,6 +346,12 @@ variable "gce_pd_csi_driver" { default = true } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "add_cluster_firewall_rules" { type = bool description = "Create additional firewall rules" diff --git a/modules/safer-cluster-update-variant/README.md b/modules/safer-cluster-update-variant/README.md index 1d02e4644..a972278a4 100644 --- a/modules/safer-cluster-update-variant/README.md +++ b/modules/safer-cluster-update-variant/README.md @@ -220,6 +220,7 @@ For simplicity, we suggest using `roles/container.admin` and | 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 | | enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster. | `bool` | `true` | no | | enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `false` | no | +| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no | | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | `list(string)` |
[
"8443",
"9443",
"15017"
]
| no | | firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no | | gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `true` | no | diff --git a/modules/safer-cluster-update-variant/main.tf b/modules/safer-cluster-update-variant/main.tf index 490c47b0c..f1de940e7 100644 --- a/modules/safer-cluster-update-variant/main.tf +++ b/modules/safer-cluster-update-variant/main.tf @@ -165,7 +165,8 @@ module "gke" { skip_provisioners = var.skip_provisioners - gce_pd_csi_driver = var.gce_pd_csi_driver + gce_pd_csi_driver = var.gce_pd_csi_driver + filestore_csi_driver = var.filestore_csi_driver notification_config_topic = var.notification_config_topic } diff --git a/modules/safer-cluster-update-variant/variables.tf b/modules/safer-cluster-update-variant/variables.tf index ef38f36bf..f05575aad 100644 --- a/modules/safer-cluster-update-variant/variables.tf +++ b/modules/safer-cluster-update-variant/variables.tf @@ -346,6 +346,12 @@ variable "gce_pd_csi_driver" { default = true } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "add_cluster_firewall_rules" { type = bool description = "Create additional firewall rules" diff --git a/modules/safer-cluster/README.md b/modules/safer-cluster/README.md index 1d02e4644..a972278a4 100644 --- a/modules/safer-cluster/README.md +++ b/modules/safer-cluster/README.md @@ -220,6 +220,7 @@ For simplicity, we suggest using `roles/container.admin` and | 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 | | enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster. | `bool` | `true` | no | | enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `false` | no | +| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no | | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | `list(string)` |
[
"8443",
"9443",
"15017"
]
| no | | firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no | | gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `true` | no | diff --git a/modules/safer-cluster/main.tf b/modules/safer-cluster/main.tf index d372600a7..860463202 100644 --- a/modules/safer-cluster/main.tf +++ b/modules/safer-cluster/main.tf @@ -165,7 +165,8 @@ module "gke" { skip_provisioners = var.skip_provisioners - gce_pd_csi_driver = var.gce_pd_csi_driver + gce_pd_csi_driver = var.gce_pd_csi_driver + filestore_csi_driver = var.filestore_csi_driver notification_config_topic = var.notification_config_topic } diff --git a/modules/safer-cluster/variables.tf b/modules/safer-cluster/variables.tf index ef38f36bf..f05575aad 100644 --- a/modules/safer-cluster/variables.tf +++ b/modules/safer-cluster/variables.tf @@ -346,6 +346,12 @@ variable "gce_pd_csi_driver" { default = true } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "add_cluster_firewall_rules" { type = bool description = "Create additional firewall rules"