Skip to content

Commit ab4802a

Browse files
committed
rebasing / merge conflicts
1 parent aff80f7 commit ab4802a

File tree

29 files changed

+195
-178
lines changed

29 files changed

+195
-178
lines changed

README.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Terraform Kubernetes Engine Module
22

3-
This module handles opinionated Google Cloud Platform Kubernetes Engine cluster creation and configuration with Node Pools, IP MASQ, Network Policy, etc.
3+
This module handles opinionated Google Cloud Platform Kubernetes Engine cluster creation and configuration with Node Pools, IP MASQ, Network Policy, etc.
44
The resources/services/activations/deletions that this module will create/trigger are:
55
- Create a GKE cluster with the provided addons
66
- Create GKE Node Pool(s) with provided configuration and attach to cluster
@@ -115,23 +115,6 @@ Then perform the following commands on the root folder:
115115
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `monitoring.googleapis.com` | no |
116116
| name | The name of the cluster (required) | string | - | yes |
117117
| network | The VPC network to host the cluster in (required) | string | - | yes |
118-
<<<<<<< HEAD
119-
| network_policy | Enable network policy addon | string | `false` | no |
120-
| network_project_id | The project ID of the shared VPC's host (for shared vpc support) | string | `` | no |
121-
| node_pools | List of maps containing node pools | list | `<list>` | no |
122-
| node_pools_labels | Map of maps containing node labels by node-pool name | map | `<map>` | no |
123-
| node_pools_metadata | Map of maps containing node metadata by node-pool name | map | `<map>` | no |
124-
| node_pools_tags | Map of lists containing node network tags by node-pool name | map | `<map>` | no |
125-
| node_pools_taints | Map of lists containing node taints by node-pool name | map | `<map>` | no |
126-
| node_version | The Kubernetes version of the node pools. Defaults kubernetes_version (master) variable and can be overridden for individual node pools by setting the `version` key on them. Must be empyty or set the same as master at cluster creation. | string | `` | no |
127-
| non_masquerade_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | list | `<list>` | no |
128-
| project_id | The project ID to host the cluster in (required) | string | - | yes |
129-
| region | The region to host the cluster in (required) | string | - | yes |
130-
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | string | `true` | no |
131-
| remove_default_node_pool | Remove default node pool while setting up the cluster | string | `false` | no |
132-
| service_account | The service account to default running nodes as if not overridden in `node_pools`. Defaults to the compute engine default service account | string | `` | no |
133-
| stub_domains | Map of stub domains and their resolvers to forward DNS queries for a certain domain to an external DNS server | map | `<map>` | no |
134-
=======
135118
| network\_policy | Enable network policy addon | string | `false` | no |
136119
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `` | no |
137120
| node\_pools | List of maps containing node pools | list | `<list>` | no |
@@ -147,7 +130,6 @@ Then perform the following commands on the root folder:
147130
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | string | `false` | no |
148131
| service\_account | The service account to default running nodes as if not overridden in `node_pools`. Defaults to the compute engine default service account | string | `` | no |
149132
| stub\_domains | Map of stub domains and their resolvers to forward DNS queries for a certain domain to an external DNS server | map | `<map>` | no |
150-
>>>>>>> regenerating docs
151133
| subnetwork | The subnetwork to host the cluster in (required) | string | - | yes |
152134
| zones | The zones to host the cluster in (optional if regional cluster / required if zonal) | list | `<list>` | no |
153135

@@ -334,4 +316,4 @@ are as follows:
334316
is a compiled language so there is no standard linter.
335317
* Terraform - terraform has a built-in linter in the 'terraform validate'
336318
command.
337-
* Dockerfiles - hadolint. Can be found in homebrew
319+
* Dockerfiles - hadolint. Can be found in homebrew

auth.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ provider "kubernetes" {
3131
host = "https://${local.cluster_endpoint}"
3232
token = "${data.google_client_config.default.access_token}"
3333
cluster_ca_certificate = "${base64decode(local.cluster_ca_certificate)}"
34-
}
34+
}

cluster_regional.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ resource "google_container_cluster" "primary" {
9393
service_account = "${lookup(var.node_pools[0], "service_account", var.service_account)}"
9494
}
9595
}
96-
9796
remove_default_node_pool = "${var.remove_default_node_pool}"
9897
}
9998

@@ -164,4 +163,4 @@ resource "null_resource" "wait_for_regional_cluster" {
164163
}
165164

166165
depends_on = ["google_container_cluster.primary", "google_container_node_pool.pools"]
167-
}
166+
}

cluster_zonal.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ resource "google_container_cluster" "zonal_primary" {
9393
service_account = "${lookup(var.node_pools[0], "service_account", var.service_account)}"
9494
}
9595
}
96-
9796
remove_default_node_pool = "${var.remove_default_node_pool}"
9897
}
9998

@@ -164,4 +163,4 @@ resource "null_resource" "wait_for_zonal_cluster" {
164163
}
165164

166165
depends_on = ["google_container_cluster.zonal_primary", "google_container_node_pool.zonal_pools"]
167-
}
166+
}

dns.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ EOF
5151
}
5252

5353
depends_on = ["null_resource.delete_default_kube_dns_configmap", "data.google_client_config.default", "google_container_cluster.primary", "google_container_node_pool.pools", "google_container_cluster.zonal_primary", "google_container_node_pool.zonal_pools"]
54-
}
54+
}

examples/deploy_service/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ It will:
1414

1515
| Name | Description | Type | Default | Required |
1616
|------|-------------|:----:|:-----:|:-----:|
17-
| cluster_name_suffix | A suffix to append to the default cluster name | string | `` | no |
18-
| compute_engine_service_account | Service account to associate to the nodes in the cluster | string | - | yes |
19-
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
20-
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
21-
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
17+
| cluster\_name\_suffix | A suffix to append to the default cluster name | string | `` | no |
18+
| compute\_engine\_service\_account | Service account to associate to the nodes in the cluster | string | - | yes |
19+
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
20+
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
21+
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
2222
| network | The VPC network to host the cluster in | string | - | yes |
2323
| project\_id | The project ID to host the cluster in | string | - | yes |
2424
| region | The region to host the cluster in | string | - | yes |

examples/disable_client_cert/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ To provision this example, run the following from within this directory:
4747
- `terraform init` to get the plugins
4848
- `terraform plan` to see the infrastructure plan
4949
- `terraform apply` to apply the infrastructure build
50-
- `terraform destroy` to destroy the built infrastructure
50+
- `terraform destroy` to destroy the built infrastructure

examples/node_pool/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ This example illustrates how to create a cluster with multiple custom node-pool
88

99
| Name | Description | Type | Default | Required |
1010
|------|-------------|:----:|:-----:|:-----:|
11-
| cluster_name_suffix | A suffix to append to the default cluster name | string | `` | no |
12-
| compute_engine_service_account | Service account to associate to the nodes in the cluster | string | - | yes |
13-
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
14-
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
15-
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
11+
| cluster\_name\_suffix | A suffix to append to the default cluster name | string | `` | no |
12+
| compute\_engine\_service\_account | Service account to associate to the nodes in the cluster | string | - | yes |
13+
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
14+
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
15+
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
1616
| network | The VPC network to host the cluster in | string | - | yes |
1717
| project\_id | The project ID to host the cluster in | string | - | yes |
1818
| region | The region to host the cluster in | string | - | yes |

examples/shared_vpc/README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,34 @@ This example illustrates how to create a simple cluster where the host network i
88

99
| Name | Description | Type | Default | Required |
1010
|------|-------------|:----:|:-----:|:-----:|
11-
| cluster_name_suffix | A suffix to append to the default cluster name | string | `` | no |
12-
| compute_engine_service_account | Service account to associate to the nodes in the cluster | string | - | yes |
13-
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
14-
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
15-
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
11+
| cluster\_name\_suffix | A suffix to append to the default cluster name | string | `` | no |
12+
| compute\_engine\_service\_account | Service account to associate to the nodes in the cluster | string | - | yes |
13+
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
14+
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
15+
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
1616
| network | The VPC network to host the cluster in | string | - | yes |
17-
| network_project_id | The GCP project housing the VPC network to host the cluster in | string | - | yes |
18-
| project_id | The project ID to host the cluster in | string | - | yes |
17+
| network\_project\_id | The GCP project housing the VPC network to host the cluster in | string | - | yes |
18+
| project\_id | The project ID to host the cluster in | string | - | yes |
1919
| region | The region to host the cluster in | string | - | yes |
2020
| subnetwork | The subnetwork to host the cluster in | string | - | yes |
2121

2222
## Outputs
2323

2424
| Name | Description |
2525
|------|-------------|
26-
| ca_certificate | |
27-
| client_token | |
28-
| cluster_name | Cluster name |
29-
| credentials_path | |
30-
| ip_range_pods | The secondary IP range used for pods |
31-
| ip_range_services | The secondary IP range used for services |
32-
| kubernetes_endpoint | |
33-
| location | |
34-
| master_kubernetes_version | The master Kubernetes version |
35-
| network | |
36-
| project_id | |
37-
| region | |
38-
| subnetwork | |
26+
| ca\_certificate | - |
27+
| client\_token | - |
28+
| cluster\_name | Cluster name |
29+
| credentials\_path | - |
30+
| ip\_range\_pods | The secondary IP range used for pods |
31+
| ip\_range\_services | The secondary IP range used for services |
32+
| kubernetes\_endpoint | - |
33+
| location | - |
34+
| master\_kubernetes\_version | The master Kubernetes version |
35+
| network | - |
36+
| project\_id | - |
37+
| region | - |
38+
| subnetwork | - |
3939
| zones | List of zones in which the cluster resides |
4040

4141
[^]: (autogen_docs_end)

examples/simple_regional/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ This example illustrates how to create a simple cluster.
88

99
| Name | Description | Type | Default | Required |
1010
|------|-------------|:----:|:-----:|:-----:|
11-
| cluster_name_suffix | A suffix to append to the default cluster name | string | `` | no |
12-
| compute_engine_service_account | Service account to associate to the nodes in the cluster | string | - | yes |
13-
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
14-
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
15-
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
11+
| cluster\_name\_suffix | A suffix to append to the default cluster name | string | `` | no |
12+
| compute\_engine\_service\_account | Service account to associate to the nodes in the cluster | string | - | yes |
13+
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
14+
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
15+
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
1616
| network | The VPC network to host the cluster in | string | - | yes |
1717
| project\_id | The project ID to host the cluster in | string | - | yes |
1818
| region | The region to host the cluster in | string | - | yes |

examples/simple_regional_private/README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,37 @@ This example illustrates how to create a simple private cluster.
44

55
[^]: (autogen_docs_start)
66

7-
87
## Inputs
98

109
| Name | Description | Type | Default | Required |
1110
|------|-------------|:----:|:-----:|:-----:|
12-
| cluster_name_suffix | A suffix to append to the default cluster name | string | `` | no |
13-
| compute_engine_service_account | Service account to associate to the nodes in the cluster | string | - | yes |
14-
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
15-
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
16-
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
11+
| cluster\_name\_suffix | A suffix to append to the default cluster name | string | `` | no |
12+
| compute\_engine\_service\_account | Service account to associate to the nodes in the cluster | string | - | yes |
13+
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
14+
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
15+
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
1716
| network | The VPC network to host the cluster in | string | - | yes |
18-
| project_id | The project ID to host the cluster in | string | - | yes |
17+
| project\_id | The project ID to host the cluster in | string | - | yes |
1918
| region | The region to host the cluster in | string | - | yes |
2019
| subnetwork | The subnetwork to host the cluster in | string | - | yes |
2120

2221
## Outputs
2322

2423
| Name | Description |
2524
|------|-------------|
26-
| ca_certificate | |
27-
| client_token | |
28-
| cluster_name | Cluster name |
29-
| credentials_path | |
30-
| ip_range_pods | The secondary IP range used for pods |
31-
| ip_range_services | The secondary IP range used for services |
32-
| kubernetes_endpoint | |
33-
| location | |
34-
| master_kubernetes_version | The master Kubernetes version |
35-
| network | |
36-
| project_id | |
37-
| region | |
38-
| subnetwork | |
25+
| ca\_certificate | - |
26+
| client\_token | - |
27+
| cluster\_name | Cluster name |
28+
| credentials\_path | - |
29+
| ip\_range\_pods | The secondary IP range used for pods |
30+
| ip\_range\_services | The secondary IP range used for services |
31+
| kubernetes\_endpoint | - |
32+
| location | - |
33+
| master\_kubernetes\_version | The master Kubernetes version |
34+
| network | - |
35+
| project\_id | - |
36+
| region | - |
37+
| subnetwork | - |
3938
| zones | List of zones in which the cluster resides |
4039

4140
[^]: (autogen_docs_end)

examples/simple_zonal/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ This example illustrates how to create a simple cluster.
88

99
| Name | Description | Type | Default | Required |
1010
|------|-------------|:----:|:-----:|:-----:|
11-
| cluster_name_suffix | A suffix to append to the default cluster name | string | `` | no |
12-
| compute_engine_service_account | Service account to associate to the nodes in the cluster | string | - | yes |
13-
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
14-
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
15-
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
11+
| cluster\_name\_suffix | A suffix to append to the default cluster name | string | `` | no |
12+
| compute\_engine\_service\_account | Service account to associate to the nodes in the cluster | string | - | yes |
13+
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
14+
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
15+
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
1616
| network | The VPC network to host the cluster in | string | - | yes |
1717
| project\_id | The project ID to host the cluster in | string | - | yes |
1818
| region | The region to host the cluster in | string | - | yes |

examples/simple_zonal_private/README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@ This example illustrates how to create a simple private cluster.
44

55
[^]: (autogen_docs_start)
66

7-
87
## Inputs
98

109
| Name | Description | Type | Default | Required |
1110
|------|-------------|:----:|:-----:|:-----:|
12-
| cluster_name_suffix | A suffix to append to the default cluster name | string | `` | no |
13-
| compute_engine_service_account | Service account to associate to the nodes in the cluster | string | - | yes |
14-
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
15-
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
16-
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
11+
| cluster\_name\_suffix | A suffix to append to the default cluster name | string | `` | no |
12+
| compute\_engine\_service\_account | Service account to associate to the nodes in the cluster | string | - | yes |
13+
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
14+
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
15+
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
1716
| network | The VPC network to host the cluster in | string | - | yes |
18-
| project_id | The project ID to host the cluster in | string | - | yes |
17+
| project\_id | The project ID to host the cluster in | string | - | yes |
1918
| region | The region to host the cluster in | string | - | yes |
2019
| subnetwork | The subnetwork to host the cluster in | string | - | yes |
2120
| zones | The zone to host the cluster in (required if is a zonal cluster) | list | - | yes |
@@ -24,19 +23,19 @@ This example illustrates how to create a simple private cluster.
2423

2524
| Name | Description |
2625
|------|-------------|
27-
| ca_certificate | |
28-
| client_token | |
29-
| cluster_name | Cluster name |
30-
| credentials_path | |
31-
| ip_range_pods | The secondary IP range used for pods |
32-
| ip_range_services | The secondary IP range used for services |
33-
| kubernetes_endpoint | |
34-
| location | |
35-
| master_kubernetes_version | The master Kubernetes version |
36-
| network | |
37-
| project_id | |
38-
| region | |
39-
| subnetwork | |
26+
| ca\_certificate | - |
27+
| client\_token | - |
28+
| cluster\_name | Cluster name |
29+
| credentials\_path | - |
30+
| ip\_range\_pods | The secondary IP range used for pods |
31+
| ip\_range\_services | The secondary IP range used for services |
32+
| kubernetes\_endpoint | - |
33+
| location | - |
34+
| master\_kubernetes\_version | The master Kubernetes version |
35+
| network | - |
36+
| project\_id | - |
37+
| region | - |
38+
| subnetwork | - |
4039
| zones | List of zones in which the cluster resides |
4140

4241
[^]: (autogen_docs_end)

0 commit comments

Comments
 (0)