Skip to content

Commit

Permalink
feat!: add gcp_filestore_csi_driver_config to addons config (#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb committed Mar 8, 2022
1 parent 2867162 commit a68fe69
Show file tree
Hide file tree
Showing 38 changed files with 118 additions and 11 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module "gke" {
http_load_balancing = false
network_policy = false
horizontal_pod_autoscaling = true
filestore_csi_driver = false
node_pools = [
{
Expand Down Expand Up @@ -143,6 +144,7 @@ Then perform the following commands on the root folder:
| 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. 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 |
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
| gcloud\_upgrade | Whether to upgrade gcloud at runtime | `bool` | `false` | no |
Expand Down
1 change: 1 addition & 0 deletions autogen/main/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module "gke" {
network_policy = false
{% endif %}
horizontal_pod_autoscaling = true
filestore_csi_driver = false
{% if private_cluster %}
enable_private_endpoint = true
enable_private_nodes = true
Expand Down
5 changes: 5 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,15 @@ resource "google_container_cluster" "primary" {
horizontal_pod_autoscaling {
disabled = !var.horizontal_pod_autoscaling
}

{% if autopilot_cluster != true %}
network_policy_config {
disabled = !var.network_policy
}

gcp_filestore_csi_driver_config {
enabled = var.filestore_csi_driver
}
{% endif %}
{% if beta_cluster and autopilot_cluster != true %}

Expand Down
6 changes: 6 additions & 0 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ variable "remove_default_node_pool" {
description = "Remove default node pool while setting up the cluster"
default = false
}

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
}
{% endif %}

variable "disable_legacy_metadata_endpoints" {
Expand Down
4 changes: 2 additions & 2 deletions autogen/main/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.6.0, < 5.0"
version = ">= 4.10.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand All @@ -38,7 +38,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.0.0, < 5.0"
version = ">= 4.10.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
5 changes: 5 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,14 @@ resource "google_container_cluster" "primary" {
horizontal_pod_autoscaling {
disabled = !var.horizontal_pod_autoscaling
}

network_policy_config {
disabled = !var.network_policy
}

gcp_filestore_csi_driver_config {
enabled = var.filestore_csi_driver
}
}

datapath_provider = var.datapath_provider
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module "gke" {
ip_range_pods = "us-central1-01-gke-01-pods"
ip_range_services = "us-central1-01-gke-01-services"
horizontal_pod_autoscaling = true
filestore_csi_driver = false
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "10.0.0.0/28"
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ resource "google_container_cluster" "primary" {
horizontal_pod_autoscaling {
disabled = !var.horizontal_pod_autoscaling
}

}

datapath_provider = var.datapath_provider
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-autopilot-private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.6.0, < 5.0"
version = ">= 4.10.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module "gke" {
ip_range_pods = "us-central1-01-gke-01-pods"
ip_range_services = "us-central1-01-gke-01-services"
horizontal_pod_autoscaling = true
filestore_csi_driver = false
enable_autopilot = true
}
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ resource "google_container_cluster" "primary" {
horizontal_pod_autoscaling {
disabled = !var.horizontal_pod_autoscaling
}

}

datapath_provider = var.datapath_provider
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-autopilot-public-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.6.0, < 5.0"
version = ">= 4.10.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 2 additions & 0 deletions modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module "gke" {
http_load_balancing = false
network_policy = false
horizontal_pod_autoscaling = true
filestore_csi_driver = false
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "10.0.0.0/28"
Expand Down Expand Up @@ -192,6 +193,7 @@ Then perform the following commands on the root folder:
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
| enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | 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. 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 |
| 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` | `false` | no |
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,15 @@ resource "google_container_cluster" "primary" {
horizontal_pod_autoscaling {
disabled = !var.horizontal_pod_autoscaling
}

network_policy_config {
disabled = !var.network_policy
}

gcp_filestore_csi_driver_config {
enabled = var.filestore_csi_driver
}

istio_config {
disabled = !var.istio
auth = var.istio_auth
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ variable "remove_default_node_pool" {
default = false
}

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 "disable_legacy_metadata_endpoints" {
type = bool
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.6.0, < 5.0"
version = ">= 4.10.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 2 additions & 0 deletions modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ module "gke" {
http_load_balancing = false
network_policy = false
horizontal_pod_autoscaling = true
filestore_csi_driver = false
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "10.0.0.0/28"
Expand Down Expand Up @@ -170,6 +171,7 @@ Then perform the following commands on the root folder:
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
| enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | 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. 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 |
| 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` | `false` | no |
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,15 @@ resource "google_container_cluster" "primary" {
horizontal_pod_autoscaling {
disabled = !var.horizontal_pod_autoscaling
}

network_policy_config {
disabled = !var.network_policy
}

gcp_filestore_csi_driver_config {
enabled = var.filestore_csi_driver
}

istio_config {
disabled = !var.istio
auth = var.istio_auth
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ variable "remove_default_node_pool" {
default = false
}

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 "disable_legacy_metadata_endpoints" {
type = bool
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.6.0, < 5.0"
version = ">= 4.10.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 2 additions & 0 deletions modules/beta-public-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ module "gke" {
http_load_balancing = false
network_policy = false
horizontal_pod_autoscaling = true
filestore_csi_driver = false
istio = true
cloudrun = true
dns_cache = false
Expand Down Expand Up @@ -183,6 +184,7 @@ Then perform the following commands on the root folder:
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
| enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | 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. 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 |
| 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` | `false` | no |
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,15 @@ resource "google_container_cluster" "primary" {
horizontal_pod_autoscaling {
disabled = !var.horizontal_pod_autoscaling
}

network_policy_config {
disabled = !var.network_policy
}

gcp_filestore_csi_driver_config {
enabled = var.filestore_csi_driver
}

istio_config {
disabled = !var.istio
auth = var.istio_auth
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-public-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ variable "remove_default_node_pool" {
default = false
}

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 "disable_legacy_metadata_endpoints" {
type = bool
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.6.0, < 5.0"
version = ">= 4.10.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 2 additions & 0 deletions modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module "gke" {
http_load_balancing = false
network_policy = false
horizontal_pod_autoscaling = true
filestore_csi_driver = false
istio = true
cloudrun = true
dns_cache = false
Expand Down Expand Up @@ -161,6 +162,7 @@ Then perform the following commands on the root folder:
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | `bool` | `true` | no |
| enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | 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. 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 |
| 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` | `false` | no |
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,15 @@ resource "google_container_cluster" "primary" {
horizontal_pod_autoscaling {
disabled = !var.horizontal_pod_autoscaling
}

network_policy_config {
disabled = !var.network_policy
}

gcp_filestore_csi_driver_config {
enabled = var.filestore_csi_driver
}

istio_config {
disabled = !var.istio
auth = var.istio_auth
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ variable "remove_default_node_pool" {
default = false
}

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 "disable_legacy_metadata_endpoints" {
type = bool
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.6.0, < 5.0"
version = ">= 4.10.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 2 additions & 0 deletions modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module "gke" {
http_load_balancing = false
network_policy = false
horizontal_pod_autoscaling = true
filestore_csi_driver = false
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "10.0.0.0/28"
Expand Down Expand Up @@ -174,6 +175,7 @@ Then perform the following commands on the root folder:
| 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. 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 |
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
| gcloud\_upgrade | Whether to upgrade gcloud at runtime | `bool` | `false` | no |
Expand Down
5 changes: 5 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,14 @@ resource "google_container_cluster" "primary" {
horizontal_pod_autoscaling {
disabled = !var.horizontal_pod_autoscaling
}

network_policy_config {
disabled = !var.network_policy
}

gcp_filestore_csi_driver_config {
enabled = var.filestore_csi_driver
}
}

datapath_provider = var.datapath_provider
Expand Down
6 changes: 6 additions & 0 deletions modules/private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ variable "remove_default_node_pool" {
default = false
}

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 "disable_legacy_metadata_endpoints" {
type = bool
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."
Expand Down

0 comments on commit a68fe69

Please sign in to comment.