Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstreamz/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb committed Nov 9, 2019
2 parents 23dc5cf + 03f0931 commit 366b5cb
Show file tree
Hide file tree
Showing 50 changed files with 154 additions and 271 deletions.
11 changes: 0 additions & 11 deletions .dockerignore

This file was deleted.

45 changes: 27 additions & 18 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,15 @@ platforms:
- name: local

suites:
# Disabled due to issue #274
# (https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/274)
# - name: "deploy_service"
# driver:
# root_module_directory: test/fixtures/deploy_service
# verifier:
# systems:
# - name: deploy_service
# backend: local
- name: "disable_client_cert"
driver:
root_module_directory: test/fixtures/disable_client_cert
verifier:
systems:
- name: disable_client_cert
backend: local
# Disabled due to issue #274
# (https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/274)
# - name: "node_pool"
# driver:
# root_module_directory: test/fixtures/node_pool
# verifier:
# systems:
# - name: node_pool
# backend: local
controls:
- gcloud
- name: "shared_vpc"
driver:
root_module_directory: test/fixtures/shared_vpc
Expand Down Expand Up @@ -112,13 +96,18 @@ suites:
systems:
- name: simple_zonal_private
backend: local
controls:
- gcloud
- name: "stub_domains"
driver:
root_module_directory: test/fixtures/stub_domains
verifier:
systems:
- name: stub_domains
backend: local
controls:
- gcloud
- kubectl
# Disabled due to issue #264
# (https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/264)
# - name: stub_domains_private
Expand Down Expand Up @@ -148,6 +137,26 @@ suites:
systems:
- name: workload_metadata_config
backend: local
- name: "deploy_service"
driver:
root_module_directory: test/fixtures/deploy_service
verifier:
systems:
- name: deploy_service
backend: local
controls:
- gcloud
- kubectl
- name: "node_pool"
driver:
root_module_directory: test/fixtures/node_pool
verifier:
systems:
- name: node_pool
backend: local
controls:
- gcloud
- kubectl
- name: "sandbox_enabled"
driver:
root_module_directory: test/fixtures/sandbox_enabled
Expand Down
8 changes: 8 additions & 0 deletions autogen/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,12 @@ output "release_channel" {
description = "The release channel of this cluster"
value = var.release_channel
}

output "identity_namespace" {
description = "Workload Identity namespace"
value = var.identity_namespace
depends_on = [
"google_container_cluster.primary"
]
}
{% endif %}
8 changes: 8 additions & 0 deletions autogen/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,12 @@

terraform {
required_version = ">= 0.12"

required_providers {
{% if beta_cluster %}
google-beta = "~> 2.18.0"
{% else %}
google = "~> 2.18.0"
{% endif %}
}
}
42 changes: 42 additions & 0 deletions build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,46 @@ steps:
- verify workload-metadata-config-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy workload-metadata-config-local']
- id: create deploy-service-local
waitFor:
- prepare
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create deploy-service-local']
- id: converge deploy-service-local
waitFor:
- create deploy-service-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge deploy-service-local']
- id: verify deploy-service-local
waitFor:
- converge deploy-service-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify deploy-service-local']
- id: destroy deploy-service-local
waitFor:
- verify deploy-service-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy deploy-service-local']
- id: create node-pool-local
waitFor:
- prepare
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create node-pool-local']
- id: converge node-pool-local
waitFor:
- create node-pool-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge node-pool-local']
- id: verify node-pool-local
waitFor:
- converge node-pool-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify node-pool-local']
- id: destroy node-pool-local
waitFor:
- verify node-pool-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy node-pool-local']
- id: create sandbox-enabled-local
waitFor:
- prepare
Expand All @@ -267,3 +307,5 @@ tags:
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.4.6'
options:
machineType: 'N1_HIGHCPU_8'
2 changes: 1 addition & 1 deletion examples/deploy_service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
1 change: 0 additions & 1 deletion examples/disable_client_cert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ This example illustrates how to create a simple cluster and disable deprecated s
|------|-------------|:----:|:-----:|:-----:|
| cluster\_name\_suffix | A suffix to append to the default cluster name | string | `""` | no |
| compute\_engine\_service\_account | Service account to associate to the nodes in the cluster | string | n/a | yes |
| credentials\_path | The path to the GCP credentials JSON file | string | n/a | yes |
| ip\_range\_pods | The secondary ip range to use for pods | string | n/a | yes |
| ip\_range\_services | The secondary ip range to use for pods | string | n/a | yes |
| network | The VPC network to host the cluster in | string | n/a | yes |
Expand Down
2 changes: 1 addition & 1 deletion examples/disable_client_cert/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
4 changes: 0 additions & 4 deletions examples/disable_client_cert/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ variable "project_id" {
description = "The project ID to host the cluster in"
}

variable "credentials_path" {
description = "The path to the GCP credentials JSON file"
}

variable "cluster_name_suffix" {
description = "A suffix to append to the default cluster name"
default = ""
Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool_update_variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/shared_vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
5 changes: 2 additions & 3 deletions examples/simple_regional_private_beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ locals {
}

provider "google-beta" {
version = "~> 2.18.0"
credentials = file(var.credentials_path)
region = var.region
version = "~> 2.18.0"
region = var.region
}

data "google_compute_subnetwork" "subnetwork" {
Expand Down
4 changes: 0 additions & 4 deletions examples/simple_regional_private_beta/test_outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ output "project_id" {
value = var.project_id
}

output "credentials_path" {
value = var.credentials_path
}

output "region" {
value = module.gke.region
}
Expand Down
4 changes: 0 additions & 4 deletions examples/simple_regional_private_beta/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ variable "project_id" {
description = "The project ID to host the cluster in"
}

variable "credentials_path" {
description = "The path to the GCP credentials JSON file"
}

variable "cluster_name_suffix" {
description = "A suffix to append to the default cluster name"
default = ""
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_zonal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
4 changes: 2 additions & 2 deletions examples/simple_zonal_private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/

locals {
cluster_type = "simple-regional-private"
cluster_type = "simple-zonal-private"
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/stub_domains/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
6 changes: 1 addition & 5 deletions examples/stub_domains_private/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@
*/

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

provider "random" {
version = "~> 2.1"
}

data "google_compute_subnetwork" "subnetwork" {
name = var.subnetwork
project = var.project_id
Expand Down
2 changes: 1 addition & 1 deletion examples/stub_domains_upstream_nameservers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/upstream_nameservers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google" {
version = "~> 2.12.0"
version = "~> 2.18.0"
region = var.region
}

Expand Down
1 change: 1 addition & 0 deletions modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| endpoint | Cluster endpoint |
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
| http\_load\_balancing\_enabled | Whether http load balancing enabled |
| identity\_namespace | Workload Identity namespace |
| intranode\_visibility\_enabled | Whether intra-node visibility is enabled |
| istio\_enabled | Whether Istio is enabled |
| kubernetes\_dashboard\_enabled | Whether kubernetes dashboard enabled |
Expand Down
8 changes: 8 additions & 0 deletions modules/beta-private-cluster-update-variant/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,11 @@ output "release_channel" {
description = "The release channel of this cluster"
value = var.release_channel
}

output "identity_namespace" {
description = "Workload Identity namespace"
value = var.identity_namespace
depends_on = [
"google_container_cluster.primary"
]
}
4 changes: 4 additions & 0 deletions modules/beta-private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@

terraform {
required_version = ">= 0.12"

required_providers {
google-beta = "~> 2.18.0"
}
}
1 change: 1 addition & 0 deletions modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
| endpoint | Cluster endpoint |
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
| http\_load\_balancing\_enabled | Whether http load balancing enabled |
| identity\_namespace | Workload Identity namespace |
| intranode\_visibility\_enabled | Whether intra-node visibility is enabled |
| istio\_enabled | Whether Istio is enabled |
| kubernetes\_dashboard\_enabled | Whether kubernetes dashboard enabled |
Expand Down
8 changes: 8 additions & 0 deletions modules/beta-private-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,11 @@ output "release_channel" {
description = "The release channel of this cluster"
value = var.release_channel
}

output "identity_namespace" {
description = "Workload Identity namespace"
value = var.identity_namespace
depends_on = [
"google_container_cluster.primary"
]
}
Loading

0 comments on commit 366b5cb

Please sign in to comment.