Skip to content

Commit

Permalink
feat: promote config_connector_config to ga (#1559)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Zhao <zhaoe@google.com>
Co-authored-by: Andrew Peabody <andrewpeabody@google.com>
Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
Co-authored-by: Awais Malik <malik.awais@gmail.com>
  • Loading branch information
5 people committed Aug 23, 2023
1 parent 3ccb19a commit ae63848
Show file tree
Hide file tree
Showing 31 changed files with 95 additions and 59 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Then perform the following commands on the root folder:
| cluster\_dns\_scope | The scope of access to cluster DNS records. DNS\_SCOPE\_UNSPECIFIED (default) or CLUSTER\_SCOPE or VPC\_SCOPE. | `string` | `"DNS_SCOPE_UNSPECIFIED"` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | `string` | `null` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | `map(string)` | `{}` | no |
| config\_connector | Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | `bool` | `false` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | `bool` | `true` | no |
| database\_encryption | 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. | `list(object({ state = string, key_name = string }))` | <pre>[<br> {<br> "key_name": "",<br> "state": "DECRYPTED"<br> }<br>]</pre> | no |
Expand Down
8 changes: 4 additions & 4 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ resource "google_container_cluster" "primary" {
enabled = gke_backup_agent_config.value.enabled
}
}

config_connector_config {
enabled = var.config_connector
}
{% endif %}
{% if beta_cluster and autopilot_cluster != true %}

Expand All @@ -305,10 +309,6 @@ resource "google_container_cluster" "primary" {
kalm_config {
enabled = var.kalm_config
}

config_connector_config {
enabled = var.config_connector
}
{% endif %}
}
{% if autopilot_cluster != true %}
Expand Down
12 changes: 6 additions & 6 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,12 @@ variable "enable_kubernetes_alpha" {
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."
default = false
}

variable "config_connector" {
type = bool
description = "Whether ConfigConnector is enabled for this cluster."
default = false
}
{% endif %}
{% if beta_cluster %}
{% if autopilot_cluster != true %}
Expand All @@ -733,12 +739,6 @@ variable "kalm_config" {
default = false
}

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

variable "cloudrun" {
description = "(Beta) Enable CloudRun addon"
type = bool
Expand Down
2 changes: 1 addition & 1 deletion autogen/safer-cluster/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ variable "firewall_inbound_ports" {

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

Expand Down
4 changes: 4 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ resource "google_container_cluster" "primary" {
enabled = gke_backup_agent_config.value.enabled
}
}

config_connector_config {
enabled = var.config_connector
}
}

datapath_provider = var.datapath_provider
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Then perform the following commands on the root folder:
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | `string` | `null` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | `map(string)` | `{}` | no |
| cluster\_telemetry\_type | Available options include ENABLED, DISABLED, and SYSTEM\_ONLY | `string` | `null` | no |
| config\_connector | (Beta) Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| config\_connector | Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | `bool` | `false` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | `bool` | `true` | no |
| database\_encryption | 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. | `list(object({ state = string, key_name = string }))` | <pre>[<br> {<br> "key_name": "",<br> "state": "DECRYPTED"<br> }<br>]</pre> | no |
Expand Down
8 changes: 4 additions & 4 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ resource "google_container_cluster" "primary" {
}
}

config_connector_config {
enabled = var.config_connector
}

istio_config {
disabled = !var.istio
auth = var.istio_auth
Expand All @@ -250,10 +254,6 @@ resource "google_container_cluster" "primary" {
kalm_config {
enabled = var.kalm_config
}

config_connector_config {
enabled = var.config_connector
}
}

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

variable "config_connector" {
type = bool
description = "Whether ConfigConnector is enabled for this cluster."
default = false
}

variable "istio" {
description = "(Beta) Enable Istio addon"
type = bool
Expand All @@ -692,12 +698,6 @@ variable "kalm_config" {
default = false
}

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

variable "cloudrun" {
description = "(Beta) Enable CloudRun addon"
type = bool
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Then perform the following commands on the root folder:
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | `string` | `null` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | `map(string)` | `{}` | no |
| cluster\_telemetry\_type | Available options include ENABLED, DISABLED, and SYSTEM\_ONLY | `string` | `null` | no |
| config\_connector | (Beta) Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| config\_connector | Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | `bool` | `false` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | `bool` | `true` | no |
| database\_encryption | 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. | `list(object({ state = string, key_name = string }))` | <pre>[<br> {<br> "key_name": "",<br> "state": "DECRYPTED"<br> }<br>]</pre> | no |
Expand Down
8 changes: 4 additions & 4 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ resource "google_container_cluster" "primary" {
}
}

config_connector_config {
enabled = var.config_connector
}

istio_config {
disabled = !var.istio
auth = var.istio_auth
Expand All @@ -250,10 +254,6 @@ resource "google_container_cluster" "primary" {
kalm_config {
enabled = var.kalm_config
}

config_connector_config {
enabled = var.config_connector
}
}

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

variable "config_connector" {
type = bool
description = "Whether ConfigConnector is enabled for this cluster."
default = false
}

variable "istio" {
description = "(Beta) Enable Istio addon"
type = bool
Expand All @@ -692,12 +698,6 @@ variable "kalm_config" {
default = false
}

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

variable "cloudrun" {
description = "(Beta) Enable CloudRun addon"
type = bool
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Then perform the following commands on the root folder:
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | `string` | `null` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | `map(string)` | `{}` | no |
| cluster\_telemetry\_type | Available options include ENABLED, DISABLED, and SYSTEM\_ONLY | `string` | `null` | no |
| config\_connector | (Beta) Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| config\_connector | Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | `bool` | `false` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | `bool` | `true` | no |
| database\_encryption | 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. | `list(object({ state = string, key_name = string }))` | <pre>[<br> {<br> "key_name": "",<br> "state": "DECRYPTED"<br> }<br>]</pre> | no |
Expand Down
8 changes: 4 additions & 4 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ resource "google_container_cluster" "primary" {
}
}

config_connector_config {
enabled = var.config_connector
}

istio_config {
disabled = !var.istio
auth = var.istio_auth
Expand All @@ -250,10 +254,6 @@ resource "google_container_cluster" "primary" {
kalm_config {
enabled = var.kalm_config
}

config_connector_config {
enabled = var.config_connector
}
}

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

variable "config_connector" {
type = bool
description = "Whether ConfigConnector is enabled for this cluster."
default = false
}

variable "istio" {
description = "(Beta) Enable Istio addon"
type = bool
Expand All @@ -662,12 +668,6 @@ variable "kalm_config" {
default = false
}

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

variable "cloudrun" {
description = "(Beta) Enable CloudRun addon"
type = bool
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Then perform the following commands on the root folder:
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | `string` | `null` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | `map(string)` | `{}` | no |
| cluster\_telemetry\_type | Available options include ENABLED, DISABLED, and SYSTEM\_ONLY | `string` | `null` | no |
| config\_connector | (Beta) Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| config\_connector | Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | `bool` | `false` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | `bool` | `true` | no |
| database\_encryption | 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. | `list(object({ state = string, key_name = string }))` | <pre>[<br> {<br> "key_name": "",<br> "state": "DECRYPTED"<br> }<br>]</pre> | no |
Expand Down
8 changes: 4 additions & 4 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ resource "google_container_cluster" "primary" {
}
}

config_connector_config {
enabled = var.config_connector
}

istio_config {
disabled = !var.istio
auth = var.istio_auth
Expand All @@ -250,10 +254,6 @@ resource "google_container_cluster" "primary" {
kalm_config {
enabled = var.kalm_config
}

config_connector_config {
enabled = var.config_connector
}
}

datapath_provider = var.datapath_provider
Expand Down
12 changes: 6 additions & 6 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,12 @@ variable "enable_kubernetes_alpha" {
default = false
}

variable "config_connector" {
type = bool
description = "Whether ConfigConnector is enabled for this cluster."
default = false
}

variable "istio" {
description = "(Beta) Enable Istio addon"
type = bool
Expand All @@ -662,12 +668,6 @@ variable "kalm_config" {
default = false
}

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

variable "cloudrun" {
description = "(Beta) Enable CloudRun addon"
type = bool
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Then perform the following commands on the root folder:
| cluster\_dns\_scope | The scope of access to cluster DNS records. DNS\_SCOPE\_UNSPECIFIED (default) or CLUSTER\_SCOPE or VPC\_SCOPE. | `string` | `"DNS_SCOPE_UNSPECIFIED"` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | `string` | `null` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | `map(string)` | `{}` | no |
| config\_connector | Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | `bool` | `false` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | `bool` | `true` | no |
| database\_encryption | 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. | `list(object({ state = string, key_name = string }))` | <pre>[<br> {<br> "key_name": "",<br> "state": "DECRYPTED"<br> }<br>]</pre> | no |
Expand Down
4 changes: 4 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ resource "google_container_cluster" "primary" {
enabled = gke_backup_agent_config.value.enabled
}
}

config_connector_config {
enabled = var.config_connector
}
}

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 @@ -644,3 +644,9 @@ variable "enable_kubernetes_alpha" {
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."
default = false
}

variable "config_connector" {
type = bool
description = "Whether ConfigConnector is enabled for this cluster."
default = false
}
1 change: 1 addition & 0 deletions modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Then perform the following commands on the root folder:
| cluster\_dns\_scope | The scope of access to cluster DNS records. DNS\_SCOPE\_UNSPECIFIED (default) or CLUSTER\_SCOPE or VPC\_SCOPE. | `string` | `"DNS_SCOPE_UNSPECIFIED"` | no |
| cluster\_ipv4\_cidr | The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. | `string` | `null` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | `map(string)` | `{}` | no |
| config\_connector | Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| configure\_ip\_masq | Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server. | `bool` | `false` | no |
| create\_service\_account | Defines if service account specified to run nodes should be created. | `bool` | `true` | no |
| database\_encryption | 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. | `list(object({ state = string, key_name = string }))` | <pre>[<br> {<br> "key_name": "",<br> "state": "DECRYPTED"<br> }<br>]</pre> | no |
Expand Down
4 changes: 4 additions & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ resource "google_container_cluster" "primary" {
enabled = gke_backup_agent_config.value.enabled
}
}

config_connector_config {
enabled = var.config_connector
}
}

datapath_provider = var.datapath_provider
Expand Down
6 changes: 6 additions & 0 deletions modules/private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -644,3 +644,9 @@ variable "enable_kubernetes_alpha" {
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."
default = false
}

variable "config_connector" {
type = bool
description = "Whether ConfigConnector is enabled for this cluster."
default = false
}
2 changes: 1 addition & 1 deletion modules/safer-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ For simplicity, we suggest using `roles/container.admin` and
| cluster\_dns\_scope | The scope of access to cluster DNS records. DNS\_SCOPE\_UNSPECIFIED (default) or CLUSTER\_SCOPE or VPC\_SCOPE. | `string` | `"DNS_SCOPE_UNSPECIFIED"` | no |
| cluster\_resource\_labels | The GCE resource labels (a map of key/value pairs) to be applied to the cluster | `map(string)` | `{}` | no |
| compute\_engine\_service\_account | Use the given service account for nodes rather than creating a new dedicated service account. | `string` | `""` | no |
| config\_connector | (Beta) Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| config\_connector | Whether ConfigConnector is enabled for this cluster. | `bool` | `false` | no |
| database\_encryption | 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. | `list(object({ state = string, key_name = string }))` | <pre>[<br> {<br> "key_name": "",<br> "state": "DECRYPTED"<br> }<br>]</pre> | no |
| datapath\_provider | The desired datapath provider for this cluster. By default, `ADVANCED_DATAPATH` enables Dataplane-V2 feature. `DATAPATH_PROVIDER_UNSPECIFIED` enables the IPTables-based kube-proxy implementation as a fallback since upgrading to V2 requires a cluster re-creation. | `string` | `"ADVANCED_DATAPATH"` | no |
| default\_max\_pods\_per\_node | The maximum number of pods to schedule per node | `number` | `110` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/safer-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ variable "firewall_inbound_ports" {

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

Expand Down
Loading

0 comments on commit ae63848

Please sign in to comment.