Skip to content

Commit 91e68b8

Browse files
Merge branch 'master' into fix_ci_tests_node_pool_deploy_service
2 parents ccaa36c + e3494d7 commit 91e68b8

File tree

35 files changed

+114
-16
lines changed

35 files changed

+114
-16
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Extending the adopted spec, each change should have a link to its corresponding
88

99
## [Unreleased]
1010

11+
### Added
12+
13+
* Support for Shielded Nodes beta feature via `enabled_shielded_nodes` variable. [#300]
14+
1115
## [v5.1.1] - 2019-10-25
1216

1317
### Fixed

autogen/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ resource "google_container_cluster" "primary" {
6565
enable_binary_authorization = var.enable_binary_authorization
6666
enable_intranode_visibility = var.enable_intranode_visibility
6767
default_max_pods_per_node = var.default_max_pods_per_node
68+
enable_shielded_nodes = var.enable_shielded_nodes
6869

6970
vertical_pod_autoscaling {
7071
enabled = var.enable_vertical_pod_autoscaling

autogen/outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,12 @@ output "release_channel" {
154154
description = "The release channel of this cluster"
155155
value = var.release_channel
156156
}
157+
158+
output "identity_namespace" {
159+
description = "Workload Identity namespace"
160+
value = var.identity_namespace
161+
depends_on = [
162+
"google_container_cluster.primary"
163+
]
164+
}
157165
{% endif %}

autogen/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,4 +427,10 @@ variable "release_channel" {
427427
description = "(Beta) The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
428428
default = null
429429
}
430+
431+
variable "enable_shielded_nodes" {
432+
type = bool
433+
description = "Enable Shielded Nodes features on all nodes in this cluster"
434+
default = false
435+
}
430436
{% endif %}

autogen/versions.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,12 @@
1616

1717
terraform {
1818
required_version = ">= 0.12"
19+
20+
required_providers {
21+
{% if beta_cluster %}
22+
google-beta = "~> 2.18.0"
23+
{% else %}
24+
google = "~> 2.18.0"
25+
{% endif %}
26+
}
1927
}

examples/deploy_service/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/disable_client_cert/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/node_pool_update_variant/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/shared_vpc/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/simple_regional/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/simple_zonal/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/simple_zonal_private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/stub_domains/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/stub_domains_private/main.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@
1515
*/
1616

1717
provider "google" {
18-
version = "~> 2.12.0"
18+
version = "~> 2.18.0"
1919
region = var.region
2020
}
2121

22-
provider "random" {
23-
version = "~> 2.1"
24-
}
25-
2622
data "google_compute_subnetwork" "subnetwork" {
2723
name = var.subnetwork
2824
project = var.project_id

examples/stub_domains_upstream_nameservers/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

examples/upstream_nameservers/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.12.0"
22+
version = "~> 2.18.0"
2323
region = var.region
2424
}
2525

modules/beta-private-cluster-update-variant/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
153153
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | bool | `"false"` | no |
154154
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | bool | `"false"` | no |
155155
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | bool | `"false"` | no |
156+
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | bool | `"false"` | no |
156157
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | bool | `"false"` | no |
157158
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no |
158159
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no |
@@ -211,6 +212,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
211212
| endpoint | Cluster endpoint |
212213
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
213214
| http\_load\_balancing\_enabled | Whether http load balancing enabled |
215+
| identity\_namespace | Workload Identity namespace |
214216
| intranode\_visibility\_enabled | Whether intra-node visibility is enabled |
215217
| istio\_enabled | Whether Istio is enabled |
216218
| kubernetes\_dashboard\_enabled | Whether kubernetes dashboard enabled |

modules/beta-private-cluster-update-variant/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ resource "google_container_cluster" "primary" {
5858
enable_binary_authorization = var.enable_binary_authorization
5959
enable_intranode_visibility = var.enable_intranode_visibility
6060
default_max_pods_per_node = var.default_max_pods_per_node
61+
enable_shielded_nodes = var.enable_shielded_nodes
6162

6263
vertical_pod_autoscaling {
6364
enabled = var.enable_vertical_pod_autoscaling

modules/beta-private-cluster-update-variant/outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,11 @@ output "release_channel" {
153153
description = "The release channel of this cluster"
154154
value = var.release_channel
155155
}
156+
157+
output "identity_namespace" {
158+
description = "Workload Identity namespace"
159+
value = var.identity_namespace
160+
depends_on = [
161+
"google_container_cluster.primary"
162+
]
163+
}

modules/beta-private-cluster-update-variant/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,3 +422,9 @@ variable "release_channel" {
422422
description = "(Beta) The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
423423
default = null
424424
}
425+
426+
variable "enable_shielded_nodes" {
427+
type = bool
428+
description = "Enable Shielded Nodes features on all nodes in this cluster"
429+
default = false
430+
}

modules/beta-private-cluster-update-variant/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616

1717
terraform {
1818
required_version = ">= 0.12"
19+
20+
required_providers {
21+
google-beta = "~> 2.18.0"
22+
}
1923
}

modules/beta-private-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
153153
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | bool | `"false"` | no |
154154
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | bool | `"false"` | no |
155155
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | bool | `"false"` | no |
156+
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | bool | `"false"` | no |
156157
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | bool | `"false"` | no |
157158
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no |
158159
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no |
@@ -211,6 +212,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
211212
| endpoint | Cluster endpoint |
212213
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
213214
| http\_load\_balancing\_enabled | Whether http load balancing enabled |
215+
| identity\_namespace | Workload Identity namespace |
214216
| intranode\_visibility\_enabled | Whether intra-node visibility is enabled |
215217
| istio\_enabled | Whether Istio is enabled |
216218
| kubernetes\_dashboard\_enabled | Whether kubernetes dashboard enabled |

modules/beta-private-cluster/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ resource "google_container_cluster" "primary" {
5858
enable_binary_authorization = var.enable_binary_authorization
5959
enable_intranode_visibility = var.enable_intranode_visibility
6060
default_max_pods_per_node = var.default_max_pods_per_node
61+
enable_shielded_nodes = var.enable_shielded_nodes
6162

6263
vertical_pod_autoscaling {
6364
enabled = var.enable_vertical_pod_autoscaling

modules/beta-private-cluster/outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,11 @@ output "release_channel" {
153153
description = "The release channel of this cluster"
154154
value = var.release_channel
155155
}
156+
157+
output "identity_namespace" {
158+
description = "Workload Identity namespace"
159+
value = var.identity_namespace
160+
depends_on = [
161+
"google_container_cluster.primary"
162+
]
163+
}

modules/beta-private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,3 +422,9 @@ variable "release_channel" {
422422
description = "(Beta) The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
423423
default = null
424424
}
425+
426+
variable "enable_shielded_nodes" {
427+
type = bool
428+
description = "Enable Shielded Nodes features on all nodes in this cluster"
429+
default = false
430+
}

modules/beta-private-cluster/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616

1717
terraform {
1818
required_version = ">= 0.12"
19+
20+
required_providers {
21+
google-beta = "~> 2.18.0"
22+
}
1923
}

modules/beta-public-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
145145
| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | bool | `"true"` | no |
146146
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | string | `"false"` | no |
147147
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | bool | `"false"` | no |
148+
| enable\_shielded\_nodes | Enable Shielded Nodes features on all nodes in this cluster | bool | `"false"` | no |
148149
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | bool | `"false"` | no |
149150
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | bool | `"false"` | no |
150151
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no |
@@ -202,6 +203,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
202203
| endpoint | Cluster endpoint |
203204
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
204205
| http\_load\_balancing\_enabled | Whether http load balancing enabled |
206+
| identity\_namespace | Workload Identity namespace |
205207
| intranode\_visibility\_enabled | Whether intra-node visibility is enabled |
206208
| istio\_enabled | Whether Istio is enabled |
207209
| kubernetes\_dashboard\_enabled | Whether kubernetes dashboard enabled |

modules/beta-public-cluster/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ resource "google_container_cluster" "primary" {
5858
enable_binary_authorization = var.enable_binary_authorization
5959
enable_intranode_visibility = var.enable_intranode_visibility
6060
default_max_pods_per_node = var.default_max_pods_per_node
61+
enable_shielded_nodes = var.enable_shielded_nodes
6162

6263
vertical_pod_autoscaling {
6364
enabled = var.enable_vertical_pod_autoscaling

modules/beta-public-cluster/outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,11 @@ output "release_channel" {
153153
description = "The release channel of this cluster"
154154
value = var.release_channel
155155
}
156+
157+
output "identity_namespace" {
158+
description = "Workload Identity namespace"
159+
value = var.identity_namespace
160+
depends_on = [
161+
"google_container_cluster.primary"
162+
]
163+
}

modules/beta-public-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,3 +398,9 @@ variable "release_channel" {
398398
description = "(Beta) The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
399399
default = null
400400
}
401+
402+
variable "enable_shielded_nodes" {
403+
type = bool
404+
description = "Enable Shielded Nodes features on all nodes in this cluster"
405+
default = false
406+
}

modules/beta-public-cluster/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616

1717
terraform {
1818
required_version = ">= 0.12"
19+
20+
required_providers {
21+
google-beta = "~> 2.18.0"
22+
}
1923
}

modules/private-cluster-update-variant/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616

1717
terraform {
1818
required_version = ">= 0.12"
19+
20+
required_providers {
21+
google = "~> 2.18.0"
22+
}
1923
}

modules/private-cluster/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616

1717
terraform {
1818
required_version = ">= 0.12"
19+
20+
required_providers {
21+
google = "~> 2.18.0"
22+
}
1923
}

versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616

1717
terraform {
1818
required_version = ">= 0.12"
19+
20+
required_providers {
21+
google = "~> 2.18.0"
22+
}
1923
}

0 commit comments

Comments
 (0)