Skip to content

Commit e6566ec

Browse files
author
chrislovecnm
committed
updates
1 parent 70a4775 commit e6566ec

File tree

13 files changed

+48
-72
lines changed

13 files changed

+48
-72
lines changed

autogen/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ locals {
144144
regional = "${element(concat(google_container_cluster.primary.*.pod_security_policy_config.0.enabled, list("")), 0)}"
145145
zonal = "${element(concat(google_container_cluster.zonal_primary.*.pod_security_policy_config.0.enabled, list("")), 0)}"
146146
}
147+
147148
cluster_type_output_binary_authorization_enabled = {
148149
regional = "${element(concat(google_container_cluster.primary.*.enable_binary_authorization.0.enabled, list("")), 0)}"
149150
zonal = "${element(concat(google_container_cluster.zonal_primary.*.enable_binary_authorization.0.enabled, list("")), 0)}"
@@ -185,10 +186,10 @@ locals {
185186
# BETA features
186187
cluster_istio_enabled = "${local.cluster_type_output_istio_enabled[local.cluster_type] ? false : true}"
187188
cluster_cloudrun_enabled = "${local.cluster_type_output_cloudrun_enabled[local.cluster_type] ? false : true}"
188-
# /BETA features
189-
{% endif %}
190-
{% if private_cluster %}
189+
191190
cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
191+
cluster_binary_authorization_enabled = "${local.cluster_type_output_binary_authorization_enabled[local.cluster_type] ? true : false}"
192+
# /BETA features
192193
{% endif %}
193194
}
194195

autogen/outputs.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ output "service_account" {
113113
value = "${local.service_account}"
114114
}
115115
{% if beta_cluster %}
116-
117116
output "istio_enabled" {
118117
description = "Whether Istio is enabled"
119118
value = "${local.cluster_istio_enabled}"
@@ -129,14 +128,8 @@ output "pod_security_policy_enabled" {
129128
value = "${local.cluster_pod_security_policy_enabled}"
130129
}
131130

132-
output "pod_security_policy_enabled" {
133-
description = "Whether pod security policy is enabled"
134-
value = "${local.cluster_pod_security_policy_enabled}"
135-
}
136-
137131
output "enable_binary_authorization" {
138132
description = "Enable BinAuthZ Admission controller"
139133
value = "${local.cluster_binary_authorization_enabled}"
140134
}
141-
142135
{% endif %}

autogen/variables.tf

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,6 @@ variable "master_authorized_networks_config" {
8686
default = []
8787
}
8888

89-
{% if beta_cluster %}
90-
variable "enable_binary_authorization" {
91-
description = "Enable BinAuthZ Admission controller"
92-
default = false
93-
}
94-
95-
variable "pod_security_policy_config" {
96-
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."
97-
98-
default = [{
99-
"enabled" = false
100-
}]
101-
}
102-
{% endif %}
103-
104-
10589
variable "horizontal_pod_autoscaling" {
10690
description = "Enable horizontal pod autoscaling addon"
10791
default = true
@@ -300,6 +284,19 @@ variable "database_encryption" {
300284
key_name = ""
301285
}]
302286
}
287+
288+
variable "enable_binary_authorization" {
289+
description = "Enable BinAuthZ Admission controller"
290+
default = false
291+
}
292+
293+
variable "pod_security_policy_config" {
294+
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."
295+
296+
default = [{
297+
"enabled" = false
298+
}]
299+
}
303300
{% endif %}
304301

305302
variable "basic_auth_username" {

modules/beta-private-cluster/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
194194
| node\_pools\_names | List of node pools names |
195195
| node\_pools\_versions | List of node pools versions |
196196
| pod\_security\_policy\_enabled | Whether pod security policy is enabled |
197-
| pod\_security\_policy\_enabled | Whether pod security policy is enabled |
198197
| region | Cluster region |
199198
| service\_account | The service account to default running nodes as if not overridden in `node_pools`. |
200199
| type | Cluster type (regional / zonal) |

modules/beta-private-cluster/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,10 @@ locals {
176176
# BETA features
177177
cluster_istio_enabled = "${local.cluster_type_output_istio_enabled[local.cluster_type] ? false : true}"
178178
cluster_cloudrun_enabled = "${local.cluster_type_output_cloudrun_enabled[local.cluster_type] ? false : true}"
179+
cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
180+
cluster_binary_authorization_enabled = "${local.cluster_type_output_binary_authorization_enabled[local.cluster_type] ? true : false}"
181+
179182
# /BETA features
180-
cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
181183
}
182184

183185
/******************************************

modules/beta-private-cluster/outputs.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ output "service_account" {
112112
description = "The service account to default running nodes as if not overridden in `node_pools`."
113113
value = "${local.service_account}"
114114
}
115-
116115
output "istio_enabled" {
117116
description = "Whether Istio is enabled"
118117
value = "${local.cluster_istio_enabled}"
@@ -128,13 +127,7 @@ output "pod_security_policy_enabled" {
128127
value = "${local.cluster_pod_security_policy_enabled}"
129128
}
130129

131-
output "pod_security_policy_enabled" {
132-
description = "Whether pod security policy is enabled"
133-
value = "${local.cluster_pod_security_policy_enabled}"
134-
}
135-
136130
output "enable_binary_authorization" {
137131
description = "Enable BinAuthZ Admission controller"
138132
value = "${local.cluster_binary_authorization_enabled}"
139133
}
140-

modules/beta-private-cluster/variables.tf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ variable "master_authorized_networks_config" {
8686
default = []
8787
}
8888

89-
variable "enable_binary_authorization" {
90-
description = "Enable BinAuthZ Admission controller"
91-
default = false
92-
}
93-
94-
variable "pod_security_policy_config" {
95-
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."
96-
97-
default = [{
98-
"enabled" = false
99-
}]
100-
}
101-
10289
variable "horizontal_pod_autoscaling" {
10390
description = "Enable horizontal pod autoscaling addon"
10491
default = true
@@ -297,6 +284,19 @@ variable "database_encryption" {
297284
}]
298285
}
299286

287+
variable "enable_binary_authorization" {
288+
description = "Enable BinAuthZ Admission controller"
289+
default = false
290+
}
291+
292+
variable "pod_security_policy_config" {
293+
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."
294+
295+
default = [{
296+
"enabled" = false
297+
}]
298+
}
299+
300300
variable "basic_auth_username" {
301301
description = "The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration."
302302
default = ""

modules/beta-public-cluster/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
185185
| node\_pools\_names | List of node pools names |
186186
| node\_pools\_versions | List of node pools versions |
187187
| pod\_security\_policy\_enabled | Whether pod security policy is enabled |
188-
| pod\_security\_policy\_enabled | Whether pod security policy is enabled |
189188
| region | Cluster region |
190189
| service\_account | The service account to default running nodes as if not overridden in `node_pools`. |
191190
| type | Cluster type (regional / zonal) |

modules/beta-public-cluster/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ locals {
167167
# BETA features
168168
cluster_istio_enabled = "${local.cluster_type_output_istio_enabled[local.cluster_type] ? false : true}"
169169
cluster_cloudrun_enabled = "${local.cluster_type_output_cloudrun_enabled[local.cluster_type] ? false : true}"
170+
cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
171+
cluster_binary_authorization_enabled = "${local.cluster_type_output_binary_authorization_enabled[local.cluster_type] ? true : false}"
170172

171173
# /BETA features
172174
}

modules/beta-public-cluster/outputs.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ output "service_account" {
112112
description = "The service account to default running nodes as if not overridden in `node_pools`."
113113
value = "${local.service_account}"
114114
}
115-
116115
output "istio_enabled" {
117116
description = "Whether Istio is enabled"
118117
value = "${local.cluster_istio_enabled}"
@@ -128,13 +127,7 @@ output "pod_security_policy_enabled" {
128127
value = "${local.cluster_pod_security_policy_enabled}"
129128
}
130129

131-
output "pod_security_policy_enabled" {
132-
description = "Whether pod security policy is enabled"
133-
value = "${local.cluster_pod_security_policy_enabled}"
134-
}
135-
136130
output "enable_binary_authorization" {
137131
description = "Enable BinAuthZ Admission controller"
138132
value = "${local.cluster_binary_authorization_enabled}"
139133
}
140-

modules/beta-public-cluster/variables.tf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ variable "master_authorized_networks_config" {
8686
default = []
8787
}
8888

89-
variable "enable_binary_authorization" {
90-
description = "Enable BinAuthZ Admission controller"
91-
default = false
92-
}
93-
94-
variable "pod_security_policy_config" {
95-
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."
96-
97-
default = [{
98-
"enabled" = false
99-
}]
100-
}
101-
10289
variable "horizontal_pod_autoscaling" {
10390
description = "Enable horizontal pod autoscaling addon"
10491
default = true
@@ -277,6 +264,19 @@ variable "database_encryption" {
277264
}]
278265
}
279266

267+
variable "enable_binary_authorization" {
268+
description = "Enable BinAuthZ Admission controller"
269+
default = false
270+
}
271+
272+
variable "pod_security_policy_config" {
273+
description = "enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."
274+
275+
default = [{
276+
"enabled" = false
277+
}]
278+
}
279+
280280
variable "basic_auth_username" {
281281
description = "The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration."
282282
default = ""

modules/private-cluster/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ locals {
153153
cluster_http_load_balancing_enabled = "${local.cluster_type_output_http_load_balancing_enabled[local.cluster_type] ? false : true}"
154154
cluster_horizontal_pod_autoscaling_enabled = "${local.cluster_type_output_horizontal_pod_autoscaling_enabled[local.cluster_type] ? false : true}"
155155
cluster_kubernetes_dashboard_enabled = "${local.cluster_type_output_kubernetes_dashboard_enabled[local.cluster_type] ? false : true}"
156-
cluster_pod_security_policy_enabled = "${local.cluster_type_output_pod_security_policy_enabled[local.cluster_type] ? true : false}"
157156
}
158157

159158
/******************************************

variables.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ variable "master_authorized_networks_config" {
8686
default = []
8787
}
8888

89-
90-
9189
variable "horizontal_pod_autoscaling" {
9290
description = "Enable horizontal pod autoscaling addon"
9391
default = true

0 commit comments

Comments
 (0)