Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislovecnm committed Jun 26, 2019
1 parent 70a4775 commit e6566ec
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 72 deletions.
7 changes: 4 additions & 3 deletions autogen/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ locals {
regional = "${element(concat(google_container_cluster.primary.*.pod_security_policy_config.0.enabled, list("")), 0)}"
zonal = "${element(concat(google_container_cluster.zonal_primary.*.pod_security_policy_config.0.enabled, list("")), 0)}"
}

cluster_type_output_binary_authorization_enabled = {
regional = "${element(concat(google_container_cluster.primary.*.enable_binary_authorization.0.enabled, list("")), 0)}"
zonal = "${element(concat(google_container_cluster.zonal_primary.*.enable_binary_authorization.0.enabled, list("")), 0)}"
Expand Down Expand Up @@ -185,10 +186,10 @@ locals {
# BETA features
cluster_istio_enabled = "${local.cluster_type_output_istio_enabled[local.cluster_type] ? false : true}"
cluster_cloudrun_enabled = "${local.cluster_type_output_cloudrun_enabled[local.cluster_type] ? false : true}"
# /BETA features
{% endif %}
{% if private_cluster %}

cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
cluster_binary_authorization_enabled = "${local.cluster_type_output_binary_authorization_enabled[local.cluster_type] ? true : false}"
# /BETA features
{% endif %}
}

Expand Down
7 changes: 0 additions & 7 deletions autogen/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ output "service_account" {
value = "${local.service_account}"
}
{% if beta_cluster %}

output "istio_enabled" {
description = "Whether Istio is enabled"
value = "${local.cluster_istio_enabled}"
Expand All @@ -129,14 +128,8 @@ output "pod_security_policy_enabled" {
value = "${local.cluster_pod_security_policy_enabled}"
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = "${local.cluster_pod_security_policy_enabled}"
}

output "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
value = "${local.cluster_binary_authorization_enabled}"
}

{% endif %}
29 changes: 13 additions & 16 deletions autogen/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,6 @@ variable "master_authorized_networks_config" {
default = []
}

{% if beta_cluster %}
variable "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
default = false
}

variable "pod_security_policy_config" {
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."

default = [{
"enabled" = false
}]
}
{% endif %}


variable "horizontal_pod_autoscaling" {
description = "Enable horizontal pod autoscaling addon"
default = true
Expand Down Expand Up @@ -300,6 +284,19 @@ variable "database_encryption" {
key_name = ""
}]
}

variable "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
default = false
}

variable "pod_security_policy_config" {
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."

default = [{
"enabled" = false
}]
}
{% endif %}

variable "basic_auth_username" {
Expand Down
1 change: 0 additions & 1 deletion modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| node\_pools\_names | List of node pools names |
| node\_pools\_versions | List of node pools versions |
| pod\_security\_policy\_enabled | Whether pod security policy is enabled |
| pod\_security\_policy\_enabled | Whether pod security policy is enabled |
| region | Cluster region |
| service\_account | The service account to default running nodes as if not overridden in `node_pools`. |
| type | Cluster type (regional / zonal) |
Expand Down
4 changes: 3 additions & 1 deletion modules/beta-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ locals {
# BETA features
cluster_istio_enabled = "${local.cluster_type_output_istio_enabled[local.cluster_type] ? false : true}"
cluster_cloudrun_enabled = "${local.cluster_type_output_cloudrun_enabled[local.cluster_type] ? false : true}"
cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
cluster_binary_authorization_enabled = "${local.cluster_type_output_binary_authorization_enabled[local.cluster_type] ? true : false}"

# /BETA features
cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
}

/******************************************
Expand Down
7 changes: 0 additions & 7 deletions modules/beta-private-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ output "service_account" {
description = "The service account to default running nodes as if not overridden in `node_pools`."
value = "${local.service_account}"
}

output "istio_enabled" {
description = "Whether Istio is enabled"
value = "${local.cluster_istio_enabled}"
Expand All @@ -128,13 +127,7 @@ output "pod_security_policy_enabled" {
value = "${local.cluster_pod_security_policy_enabled}"
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = "${local.cluster_pod_security_policy_enabled}"
}

output "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
value = "${local.cluster_binary_authorization_enabled}"
}

26 changes: 13 additions & 13 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,6 @@ variable "master_authorized_networks_config" {
default = []
}

variable "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
default = false
}

variable "pod_security_policy_config" {
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."

default = [{
"enabled" = false
}]
}

variable "horizontal_pod_autoscaling" {
description = "Enable horizontal pod autoscaling addon"
default = true
Expand Down Expand Up @@ -297,6 +284,19 @@ variable "database_encryption" {
}]
}

variable "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
default = false
}

variable "pod_security_policy_config" {
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."

default = [{
"enabled" = false
}]
}

variable "basic_auth_username" {
description = "The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration."
default = ""
Expand Down
1 change: 0 additions & 1 deletion modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| node\_pools\_names | List of node pools names |
| node\_pools\_versions | List of node pools versions |
| pod\_security\_policy\_enabled | Whether pod security policy is enabled |
| pod\_security\_policy\_enabled | Whether pod security policy is enabled |
| region | Cluster region |
| service\_account | The service account to default running nodes as if not overridden in `node_pools`. |
| type | Cluster type (regional / zonal) |
Expand Down
2 changes: 2 additions & 0 deletions modules/beta-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ locals {
# BETA features
cluster_istio_enabled = "${local.cluster_type_output_istio_enabled[local.cluster_type] ? false : true}"
cluster_cloudrun_enabled = "${local.cluster_type_output_cloudrun_enabled[local.cluster_type] ? false : true}"
cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
cluster_binary_authorization_enabled = "${local.cluster_type_output_binary_authorization_enabled[local.cluster_type] ? true : false}"

# /BETA features
}
Expand Down
7 changes: 0 additions & 7 deletions modules/beta-public-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ output "service_account" {
description = "The service account to default running nodes as if not overridden in `node_pools`."
value = "${local.service_account}"
}

output "istio_enabled" {
description = "Whether Istio is enabled"
value = "${local.cluster_istio_enabled}"
Expand All @@ -128,13 +127,7 @@ output "pod_security_policy_enabled" {
value = "${local.cluster_pod_security_policy_enabled}"
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = "${local.cluster_pod_security_policy_enabled}"
}

output "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
value = "${local.cluster_binary_authorization_enabled}"
}

26 changes: 13 additions & 13 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,6 @@ variable "master_authorized_networks_config" {
default = []
}

variable "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
default = false
}

variable "pod_security_policy_config" {
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."

default = [{
"enabled" = false
}]
}

variable "horizontal_pod_autoscaling" {
description = "Enable horizontal pod autoscaling addon"
default = true
Expand Down Expand Up @@ -277,6 +264,19 @@ variable "database_encryption" {
}]
}

variable "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller"
default = false
}

variable "pod_security_policy_config" {
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."

default = [{
"enabled" = false
}]
}

variable "basic_auth_username" {
description = "The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration."
default = ""
Expand Down
1 change: 0 additions & 1 deletion modules/private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ locals {
cluster_http_load_balancing_enabled = "${local.cluster_type_output_http_load_balancing_enabled[local.cluster_type] ? false : true}"
cluster_horizontal_pod_autoscaling_enabled = "${local.cluster_type_output_horizontal_pod_autoscaling_enabled[local.cluster_type] ? false : true}"
cluster_kubernetes_dashboard_enabled = "${local.cluster_type_output_kubernetes_dashboard_enabled[local.cluster_type] ? false : true}"
cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
}

/******************************************
Expand Down
2 changes: 0 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ variable "master_authorized_networks_config" {
default = []
}



variable "horizontal_pod_autoscaling" {
description = "Enable horizontal pod autoscaling addon"
default = true
Expand Down

0 comments on commit e6566ec

Please sign in to comment.