Skip to content

Commit

Permalink
rebasing / merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
coryodaniel committed Feb 13, 2019
1 parent aff80f7 commit ab4802a
Show file tree
Hide file tree
Showing 29 changed files with 195 additions and 178 deletions.
22 changes: 2 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Terraform Kubernetes Engine Module

This module handles opinionated Google Cloud Platform Kubernetes Engine cluster creation and configuration with Node Pools, IP MASQ, Network Policy, etc.
This module handles opinionated Google Cloud Platform Kubernetes Engine cluster creation and configuration with Node Pools, IP MASQ, Network Policy, etc.
The resources/services/activations/deletions that this module will create/trigger are:
- Create a GKE cluster with the provided addons
- Create GKE Node Pool(s) with provided configuration and attach to cluster
Expand Down Expand Up @@ -115,23 +115,6 @@ Then perform the following commands on the root folder:
| 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 |
| name | The name of the cluster (required) | string | - | yes |
| network | The VPC network to host the cluster in (required) | string | - | yes |
<<<<<<< HEAD
| network_policy | Enable network policy addon | string | `false` | no |
| network_project_id | The project ID of the shared VPC's host (for shared vpc support) | string | `` | no |
| node_pools | List of maps containing node pools | list | `<list>` | no |
| node_pools_labels | Map of maps containing node labels by node-pool name | map | `<map>` | no |
| node_pools_metadata | Map of maps containing node metadata by node-pool name | map | `<map>` | no |
| node_pools_tags | Map of lists containing node network tags by node-pool name | map | `<map>` | no |
| node_pools_taints | Map of lists containing node taints by node-pool name | map | `<map>` | no |
| 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 |
| non_masquerade_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | list | `<list>` | no |
| project_id | The project ID to host the cluster in (required) | string | - | yes |
| region | The region to host the cluster in (required) | string | - | yes |
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | string | `true` | no |
| remove_default_node_pool | Remove default node pool while setting up the cluster | string | `false` | no |
| 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 |
| 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 |
=======
| network\_policy | Enable network policy addon | string | `false` | no |
| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `` | no |
| node\_pools | List of maps containing node pools | list | `<list>` | no |
Expand All @@ -147,7 +130,6 @@ Then perform the following commands on the root folder:
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | string | `false` | no |
| 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 |
| 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 |
>>>>>>> regenerating docs
| subnetwork | The subnetwork to host the cluster in (required) | string | - | yes |
| zones | The zones to host the cluster in (optional if regional cluster / required if zonal) | list | `<list>` | no |

Expand Down Expand Up @@ -334,4 +316,4 @@ are as follows:
is a compiled language so there is no standard linter.
* Terraform - terraform has a built-in linter in the 'terraform validate'
command.
* Dockerfiles - hadolint. Can be found in homebrew
* Dockerfiles - hadolint. Can be found in homebrew
2 changes: 1 addition & 1 deletion auth.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ provider "kubernetes" {
host = "https://${local.cluster_endpoint}"
token = "${data.google_client_config.default.access_token}"
cluster_ca_certificate = "${base64decode(local.cluster_ca_certificate)}"
}
}
3 changes: 1 addition & 2 deletions cluster_regional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ resource "google_container_cluster" "primary" {
service_account = "${lookup(var.node_pools[0], "service_account", var.service_account)}"
}
}

remove_default_node_pool = "${var.remove_default_node_pool}"
}

Expand Down Expand Up @@ -164,4 +163,4 @@ resource "null_resource" "wait_for_regional_cluster" {
}

depends_on = ["google_container_cluster.primary", "google_container_node_pool.pools"]
}
}
3 changes: 1 addition & 2 deletions cluster_zonal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ resource "google_container_cluster" "zonal_primary" {
service_account = "${lookup(var.node_pools[0], "service_account", var.service_account)}"
}
}

remove_default_node_pool = "${var.remove_default_node_pool}"
}

Expand Down Expand Up @@ -164,4 +163,4 @@ resource "null_resource" "wait_for_zonal_cluster" {
}

depends_on = ["google_container_cluster.zonal_primary", "google_container_node_pool.zonal_pools"]
}
}
2 changes: 1 addition & 1 deletion dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ EOF
}

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"]
}
}
10 changes: 5 additions & 5 deletions examples/deploy_service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ It will:

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| 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 | - | yes |
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
| 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 | - | yes |
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
| network | The VPC network to host the cluster in | string | - | yes |
| project\_id | The project ID to host the cluster in | string | - | yes |
| region | The region to host the cluster in | string | - | yes |
Expand Down
2 changes: 1 addition & 1 deletion examples/disable_client_cert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ To provision this example, run the following from within this directory:
- `terraform init` to get the plugins
- `terraform plan` to see the infrastructure plan
- `terraform apply` to apply the infrastructure build
- `terraform destroy` to destroy the built infrastructure
- `terraform destroy` to destroy the built infrastructure
10 changes: 5 additions & 5 deletions examples/node_pool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ This example illustrates how to create a cluster with multiple custom node-pool

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| 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 | - | yes |
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
| 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 | - | yes |
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
| network | The VPC network to host the cluster in | string | - | yes |
| project\_id | The project ID to host the cluster in | string | - | yes |
| region | The region to host the cluster in | string | - | yes |
Expand Down
40 changes: 20 additions & 20 deletions examples/shared_vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ This example illustrates how to create a simple cluster where the host network i

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| 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 | - | yes |
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
| 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 | - | yes |
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
| network | The VPC network to host the cluster in | string | - | yes |
| network_project_id | The GCP project housing the VPC network to host the cluster in | string | - | yes |
| project_id | The project ID to host the cluster in | string | - | yes |
| network\_project\_id | The GCP project housing the VPC network to host the cluster in | string | - | yes |
| project\_id | The project ID to host the cluster in | string | - | yes |
| region | The region to host the cluster in | string | - | yes |
| subnetwork | The subnetwork to host the cluster in | string | - | yes |

## Outputs

| Name | Description |
|------|-------------|
| ca_certificate | |
| client_token | |
| cluster_name | Cluster name |
| credentials_path | |
| ip_range_pods | The secondary IP range used for pods |
| ip_range_services | The secondary IP range used for services |
| kubernetes_endpoint | |
| location | |
| master_kubernetes_version | The master Kubernetes version |
| network | |
| project_id | |
| region | |
| subnetwork | |
| ca\_certificate | - |
| client\_token | - |
| cluster\_name | Cluster name |
| credentials\_path | - |
| ip\_range\_pods | The secondary IP range used for pods |
| ip\_range\_services | The secondary IP range used for services |
| kubernetes\_endpoint | - |
| location | - |
| master\_kubernetes\_version | The master Kubernetes version |
| network | - |
| project\_id | - |
| region | - |
| subnetwork | - |
| zones | List of zones in which the cluster resides |

[^]: (autogen_docs_end)
Expand Down
10 changes: 5 additions & 5 deletions examples/simple_regional/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ This example illustrates how to create a simple cluster.

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| 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 | - | yes |
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
| 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 | - | yes |
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
| network | The VPC network to host the cluster in | string | - | yes |
| project\_id | The project ID to host the cluster in | string | - | yes |
| region | The region to host the cluster in | string | - | yes |
Expand Down
39 changes: 19 additions & 20 deletions examples/simple_regional_private/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,37 @@ This example illustrates how to create a simple private cluster.

[^]: (autogen_docs_start)


## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| 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 | - | yes |
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
| 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 | - | yes |
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
| network | The VPC network to host the cluster in | string | - | yes |
| project_id | The project ID to host the cluster in | string | - | yes |
| project\_id | The project ID to host the cluster in | string | - | yes |
| region | The region to host the cluster in | string | - | yes |
| subnetwork | The subnetwork to host the cluster in | string | - | yes |

## Outputs

| Name | Description |
|------|-------------|
| ca_certificate | |
| client_token | |
| cluster_name | Cluster name |
| credentials_path | |
| ip_range_pods | The secondary IP range used for pods |
| ip_range_services | The secondary IP range used for services |
| kubernetes_endpoint | |
| location | |
| master_kubernetes_version | The master Kubernetes version |
| network | |
| project_id | |
| region | |
| subnetwork | |
| ca\_certificate | - |
| client\_token | - |
| cluster\_name | Cluster name |
| credentials\_path | - |
| ip\_range\_pods | The secondary IP range used for pods |
| ip\_range\_services | The secondary IP range used for services |
| kubernetes\_endpoint | - |
| location | - |
| master\_kubernetes\_version | The master Kubernetes version |
| network | - |
| project\_id | - |
| region | - |
| subnetwork | - |
| zones | List of zones in which the cluster resides |

[^]: (autogen_docs_end)
Expand Down
10 changes: 5 additions & 5 deletions examples/simple_zonal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ This example illustrates how to create a simple cluster.

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| 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 | - | yes |
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
| 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 | - | yes |
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
| network | The VPC network to host the cluster in | string | - | yes |
| project\_id | The project ID to host the cluster in | string | - | yes |
| region | The region to host the cluster in | string | - | yes |
Expand Down
39 changes: 19 additions & 20 deletions examples/simple_zonal_private/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ This example illustrates how to create a simple private cluster.

[^]: (autogen_docs_start)


## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| 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 | - | yes |
| credentials_path | The path to the GCP credentials JSON file | string | - | yes |
| ip_range_pods | The secondary ip range to use for pods | string | - | yes |
| ip_range_services | The secondary ip range to use for pods | string | - | yes |
| 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 | - | yes |
| credentials\_path | The path to the GCP credentials JSON file | string | - | yes |
| ip\_range\_pods | The secondary ip range to use for pods | string | - | yes |
| ip\_range\_services | The secondary ip range to use for pods | string | - | yes |
| network | The VPC network to host the cluster in | string | - | yes |
| project_id | The project ID to host the cluster in | string | - | yes |
| project\_id | The project ID to host the cluster in | string | - | yes |
| region | The region to host the cluster in | string | - | yes |
| subnetwork | The subnetwork to host the cluster in | string | - | yes |
| zones | The zone to host the cluster in (required if is a zonal cluster) | list | - | yes |
Expand All @@ -24,19 +23,19 @@ This example illustrates how to create a simple private cluster.

| Name | Description |
|------|-------------|
| ca_certificate | |
| client_token | |
| cluster_name | Cluster name |
| credentials_path | |
| ip_range_pods | The secondary IP range used for pods |
| ip_range_services | The secondary IP range used for services |
| kubernetes_endpoint | |
| location | |
| master_kubernetes_version | The master Kubernetes version |
| network | |
| project_id | |
| region | |
| subnetwork | |
| ca\_certificate | - |
| client\_token | - |
| cluster\_name | Cluster name |
| credentials\_path | - |
| ip\_range\_pods | The secondary IP range used for pods |
| ip\_range\_services | The secondary IP range used for services |
| kubernetes\_endpoint | - |
| location | - |
| master\_kubernetes\_version | The master Kubernetes version |
| network | - |
| project\_id | - |
| region | - |
| subnetwork | - |
| zones | List of zones in which the cluster resides |

[^]: (autogen_docs_end)
Expand Down
Loading

0 comments on commit ab4802a

Please sign in to comment.