Skip to content

Commit

Permalink
feat: Add support for KALM config (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
c0ffeec0der committed May 26, 2020
1 parent fc031fc commit 6bf1178
Show file tree
Hide file tree
Showing 22 changed files with 54 additions and 11 deletions.
4 changes: 4 additions & 0 deletions autogen/main/cluster.tf.tmpl
Expand Up @@ -160,6 +160,10 @@ resource "google_container_cluster" "primary" {
enabled = gce_persistent_disk_csi_driver_config.value.enabled
}
}

kalm_config {
enabled = var.kalm_config
}
{% endif %}
}

Expand Down
6 changes: 6 additions & 0 deletions autogen/main/variables.tf.tmpl
Expand Up @@ -423,6 +423,12 @@ variable "gce_pd_csi_driver" {
default = false
}

variable "kalm_config" {
type = bool
description = "(Beta) Whether KALM is enabled for this cluster."
default = false
}

variable "database_encryption" {
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
type = list(object({ state = string, key_name = string }))
Expand Down
2 changes: 1 addition & 1 deletion autogen/main/versions.tf.tmpl
Expand Up @@ -19,7 +19,7 @@ terraform {

required_providers {
{% if beta_cluster %}
google-beta = ">= 3.19, <4.0.0"
google-beta = ">= 3.21.0, <4.0.0"
{% else %}
google = ">= 3.16, <4.0.0"
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool/main.tf
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.19.0"
version = "~> 3.21.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool_update_variant_beta/main.tf
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.19.0"
version = "~> 3.21.0"
credentials = file(var.credentials_path)
region = var.region
}
Expand Down
2 changes: 1 addition & 1 deletion examples/safer_cluster/main.tf
Expand Up @@ -34,7 +34,7 @@ provider "google" {
}

provider "google-beta" {
version = "~> 3.19.0"
version = "~> 3.21.0"
}

module "gke" {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_beta/main.tf
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.19.0"
version = "~> 3.21.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_private_beta/main.tf
Expand Up @@ -24,7 +24,7 @@ provider "google" {
}

provider "google-beta" {
version = "~> 3.19.0"
version = "~> 3.21.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/workload_metadata_config/main.tf
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.19.0"
version = "~> 3.21.0"
region = var.region
}

Expand Down
1 change: 1 addition & 0 deletions modules/beta-private-cluster-update-variant/README.md
Expand Up @@ -196,6 +196,7 @@ Then perform the following commands on the root folder:
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | bool | `"false"` | no |
| istio | (Beta) Enable Istio addon | string | `"false"` | no |
| istio\_auth | (Beta) The authentication type between services in Istio. | string | `"AUTH_MUTUAL_TLS"` | no |
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | bool | `"false"` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | string | `"latest"` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | string | `""` | no |
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Expand Up @@ -145,6 +145,10 @@ resource "google_container_cluster" "primary" {
enabled = gce_persistent_disk_csi_driver_config.value.enabled
}
}

kalm_config {
enabled = var.kalm_config
}
}

ip_allocation_policy {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster-update-variant/variables.tf
Expand Up @@ -416,6 +416,12 @@ variable "gce_pd_csi_driver" {
default = false
}

variable "kalm_config" {
type = bool
description = "(Beta) Whether KALM is enabled for this cluster."
default = false
}

variable "database_encryption" {
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
type = list(object({ state = string, key_name = string }))
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/versions.tf
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = "~> 0.12.6"

required_providers {
google-beta = ">= 3.19, <4.0.0"
google-beta = ">= 3.21.0, <4.0.0"
}
}
1 change: 1 addition & 0 deletions modules/beta-private-cluster/README.md
Expand Up @@ -174,6 +174,7 @@ Then perform the following commands on the root folder:
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | bool | `"false"` | no |
| istio | (Beta) Enable Istio addon | string | `"false"` | no |
| istio\_auth | (Beta) The authentication type between services in Istio. | string | `"AUTH_MUTUAL_TLS"` | no |
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | bool | `"false"` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | string | `"latest"` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | string | `""` | no |
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Expand Up @@ -145,6 +145,10 @@ resource "google_container_cluster" "primary" {
enabled = gce_persistent_disk_csi_driver_config.value.enabled
}
}

kalm_config {
enabled = var.kalm_config
}
}

ip_allocation_policy {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster/variables.tf
Expand Up @@ -416,6 +416,12 @@ variable "gce_pd_csi_driver" {
default = false
}

variable "kalm_config" {
type = bool
description = "(Beta) Whether KALM is enabled for this cluster."
default = false
}

variable "database_encryption" {
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
type = list(object({ state = string, key_name = string }))
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/versions.tf
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = "~> 0.12.6"

required_providers {
google-beta = ">= 3.19, <4.0.0"
google-beta = ">= 3.21.0, <4.0.0"
}
}
1 change: 1 addition & 0 deletions modules/beta-public-cluster/README.md
Expand Up @@ -153,6 +153,7 @@ Then perform the following commands on the root folder:
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | bool | `"false"` | no |
| istio | (Beta) Enable Istio addon | string | `"false"` | no |
| istio\_auth | (Beta) The authentication type between services in Istio. | string | `"AUTH_MUTUAL_TLS"` | no |
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | bool | `"false"` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | string | `"latest"` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | string | `""` | no |
Expand Down
4 changes: 4 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Expand Up @@ -145,6 +145,10 @@ resource "google_container_cluster" "primary" {
enabled = gce_persistent_disk_csi_driver_config.value.enabled
}
}

kalm_config {
enabled = var.kalm_config
}
}

ip_allocation_policy {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-public-cluster/variables.tf
Expand Up @@ -392,6 +392,12 @@ variable "gce_pd_csi_driver" {
default = false
}

variable "kalm_config" {
type = bool
description = "(Beta) Whether KALM is enabled for this cluster."
default = false
}

variable "database_encryption" {
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
type = list(object({ state = string, key_name = string }))
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/versions.tf
Expand Up @@ -18,6 +18,6 @@ terraform {
required_version = "~> 0.12.6"

required_providers {
google-beta = ">= 3.19, <4.0.0"
google-beta = ">= 3.21.0, <4.0.0"
}
}
2 changes: 1 addition & 1 deletion test/setup/versions.tf
Expand Up @@ -23,5 +23,5 @@ provider "google" {
}

provider "google-beta" {
version = "2.20.1"
version = "3.21.0"
}

0 comments on commit 6bf1178

Please sign in to comment.