Skip to content

Commit

Permalink
Take feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
IIBenII authored and bberriot committed Jan 4, 2023
1 parent 2dfdb06 commit 08009af
Show file tree
Hide file tree
Showing 28 changed files with 43 additions and 33 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ Then perform the following commands on the root folder:
| dns\_cache | The status of the NodeLocal DNSCache addon. | `bool` | `false` | no |
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
| enable\_kubernetes\_alpha | 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. | `bool` | `false` | no |
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
| 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 |
Expand Down
3 changes: 2 additions & 1 deletion autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,10 @@ resource "google_container_cluster" "primary" {
}
}

enable_kubernetes_alpha = var.enable_kubernetes_alpha

{% if beta_cluster %}
enable_intranode_visibility = var.enable_intranode_visibility
enable_kubernetes_alpha = var.enable_kubernetes_alpha
enable_tpu = var.enable_tpu

dynamic "pod_security_policy_config" {
Expand Down
2 changes: 1 addition & 1 deletion autogen/main/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ locals {
# BETA features
cluster_istio_enabled = ! local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null

# /BETA features
{% endif %}
Expand Down
8 changes: 2 additions & 6 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ variable "cluster_telemetry_type" {
default = null
}
{% endif %}

variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -670,17 +669,14 @@ variable "logging_enabled_components" {
description = "List of services to monitor: SYSTEM_COMPONENTS, WORKLOADS. Empty list is default GKE configuration."
default = []
}
{% endif %}

{% if beta_cluster %}
{% if autopilot_cluster != true %}

variable "enable_kubernetes_alpha" {
type = bool
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
}
{% endif %}
{% endif %}
{% if beta_cluster %}
{% if autopilot_cluster != true %}

variable "istio" {
Expand Down
2 changes: 2 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ resource "google_container_cluster" "primary" {
}
}

enable_kubernetes_alpha = var.enable_kubernetes_alpha

dynamic "master_authorized_networks_config" {
for_each = local.master_authorized_networks_config
content {
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-autopilot-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ locals {
# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null

# /BETA features

Expand Down
2 changes: 0 additions & 2 deletions modules/beta-autopilot-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ variable "cluster_telemetry_type" {
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
default = null
}

variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -423,4 +422,3 @@ variable "timeouts" {
}
}


2 changes: 1 addition & 1 deletion modules/beta-autopilot-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ locals {
# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null

# /BETA features

Expand Down
2 changes: 0 additions & 2 deletions modules/beta-autopilot-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ variable "cluster_telemetry_type" {
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
default = null
}

variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -393,4 +392,3 @@ variable "timeouts" {
}
}


3 changes: 2 additions & 1 deletion modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ resource "google_container_cluster" "primary" {
}
}

enable_kubernetes_alpha = var.enable_kubernetes_alpha

enable_intranode_visibility = var.enable_intranode_visibility
enable_kubernetes_alpha = var.enable_kubernetes_alpha
enable_tpu = var.enable_tpu

dynamic "pod_security_policy_config" {
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ locals {
# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null

# /BETA features

Expand Down
2 changes: 0 additions & 2 deletions modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ variable "cluster_telemetry_type" {
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
default = null
}

variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -642,7 +641,6 @@ variable "logging_enabled_components" {
default = []
}


variable "enable_kubernetes_alpha" {
type = bool
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."
Expand Down
3 changes: 2 additions & 1 deletion modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ resource "google_container_cluster" "primary" {
}
}

enable_kubernetes_alpha = var.enable_kubernetes_alpha

enable_intranode_visibility = var.enable_intranode_visibility
enable_kubernetes_alpha = var.enable_kubernetes_alpha
enable_tpu = var.enable_tpu

dynamic "pod_security_policy_config" {
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ locals {
# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null

# /BETA features

Expand Down
2 changes: 0 additions & 2 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ variable "cluster_telemetry_type" {
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
default = null
}

variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -642,7 +641,6 @@ variable "logging_enabled_components" {
default = []
}


variable "enable_kubernetes_alpha" {
type = bool
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."
Expand Down
3 changes: 2 additions & 1 deletion modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ resource "google_container_cluster" "primary" {
}
}

enable_kubernetes_alpha = var.enable_kubernetes_alpha

enable_intranode_visibility = var.enable_intranode_visibility
enable_kubernetes_alpha = var.enable_kubernetes_alpha
enable_tpu = var.enable_tpu

dynamic "pod_security_policy_config" {
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ locals {
# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null

# /BETA features

Expand Down
2 changes: 0 additions & 2 deletions modules/beta-public-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ variable "cluster_telemetry_type" {
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
default = null
}

variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -612,7 +611,6 @@ variable "logging_enabled_components" {
default = []
}


variable "enable_kubernetes_alpha" {
type = bool
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."
Expand Down
3 changes: 2 additions & 1 deletion modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ resource "google_container_cluster" "primary" {
}
}

enable_kubernetes_alpha = var.enable_kubernetes_alpha

enable_intranode_visibility = var.enable_intranode_visibility
enable_kubernetes_alpha = var.enable_kubernetes_alpha
enable_tpu = var.enable_tpu

dynamic "pod_security_policy_config" {
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ locals {
# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
confidential_node_config = var.enable_confidential_nodes == true ? [{ enabled = true }] : []
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null

# /BETA features

Expand Down
2 changes: 0 additions & 2 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ variable "cluster_telemetry_type" {
description = "Available options include ENABLED, DISABLED, and SYSTEM_ONLY"
default = null
}

variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -612,7 +611,6 @@ variable "logging_enabled_components" {
default = []
}


variable "enable_kubernetes_alpha" {
type = bool
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."
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 @@ -177,6 +177,7 @@ Then perform the following commands on the root folder:
| dns\_cache | The status of the NodeLocal DNSCache addon. | `bool` | `false` | no |
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
| enable\_kubernetes\_alpha | 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. | `bool` | `false` | no |
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | `bool` | `false` | no |
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | `bool` | `false` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ resource "google_container_cluster" "primary" {
}
}

enable_kubernetes_alpha = var.enable_kubernetes_alpha

dynamic "master_authorized_networks_config" {
for_each = local.master_authorized_networks_config
content {
Expand Down
6 changes: 5 additions & 1 deletion modules/private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ variable "configure_ip_masq" {
default = false
}


variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -614,3 +613,8 @@ variable "logging_enabled_components" {
default = []
}

variable "enable_kubernetes_alpha" {
type = bool
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
}
1 change: 1 addition & 0 deletions modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Then perform the following commands on the root folder:
| dns\_cache | The status of the NodeLocal DNSCache addon. | `bool` | `false` | no |
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
| enable\_kubernetes\_alpha | 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. | `bool` | `false` | no |
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | `bool` | `false` | no |
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | `bool` | `false` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ resource "google_container_cluster" "primary" {
}
}

enable_kubernetes_alpha = var.enable_kubernetes_alpha

dynamic "master_authorized_networks_config" {
for_each = local.master_authorized_networks_config
content {
Expand Down
6 changes: 5 additions & 1 deletion modules/private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ variable "configure_ip_masq" {
default = false
}


variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -614,3 +613,8 @@ variable "logging_enabled_components" {
default = []
}

variable "enable_kubernetes_alpha" {
type = bool
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
}
6 changes: 5 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ variable "configure_ip_masq" {
default = false
}


variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
Expand Down Expand Up @@ -584,3 +583,8 @@ variable "logging_enabled_components" {
default = []
}

variable "enable_kubernetes_alpha" {
type = bool
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
}

0 comments on commit 08009af

Please sign in to comment.