Add optional controller_type and worker_type vars on GCP

* Remove optional machine_type variable on Google Cloud
* Use controller_type and worker_type instead
This commit is contained in:
Dalton Hubble 2018-03-25 22:11:18 -07:00
parent 8d3d4220fd
commit fdb543e834
5 changed files with 19 additions and 9 deletions

View File

@ -13,6 +13,9 @@ Notable changes between versions.
#### Google Cloud
* Add `disk_size` variable for setting instance disk size in GB
* Add `controller_type` variable for setting machine type for controllers
* Add `worker_type` variable for setting machine type for workers
* Remove optional variable `machine_type`. Use `controller_type` and `worker_type`.
## v1.9.6

View File

@ -249,8 +249,8 @@ Reference the DNS zone id with `"${aws_route53_zone.zone-for-clusters.zone_id}"`
|:-----|:------------|:--------|:--------|
| controller_count | Number of controllers (i.e. masters) | 1 | 1 |
| worker_count | Number of workers | 1 | 3 |
| controller_type | EC2 instance type for controllers | "t2.small" | "t2.medium" |
| worker_type | EC2 instance type for workers | "t2.small" | "t2.medium" |
| controller_type | EC2 instance type for controllers | "t2.small" | See below |
| worker_type | EC2 instance type for workers | "t2.small" | See below |
| os_channel | Container Linux AMI channel | stable | stable, beta, alpha |
| disk_size | Size of the EBS volume in GB | "40" | "100" |
| controller_clc_snippets | Controller Container Linux Config snippets | [] | |

View File

@ -254,7 +254,8 @@ resource "google_dns_managed_zone" "zone-for-clusters" {
|:-----|:------------|:--------|:--------|
| controller_count | Number of controllers (i.e. masters) | 1 | 1 |
| worker_count | Number of workers | 1 | 3 |
| machine_type | Machine type for compute instances | "n1-standard-1" | See below |
| controller_type | Machine type for controllers | "n1-standard-1" | See below |
| worker_type | Machine type for workers | "n1-standard-1" | See below |
| os_image | Container Linux image for compute instances | "coreos-stable" | "coreos-stable-1632-3-0-v20180215" |
| disk_size | Size of the disk in GB | 40 | 100 |
| worker_preemptible | If enabled, Compute Engine will terminate workers randomly within 24 hours | false | true |

View File

@ -8,7 +8,7 @@ module "controllers" {
dns_zone = "${var.dns_zone}"
dns_zone_name = "${var.dns_zone_name}"
count = "${var.controller_count}"
machine_type = "${var.machine_type}"
machine_type = "${var.controller_type}"
os_image = "${var.os_image}"
disk_size = "${var.disk_size}"
@ -30,7 +30,7 @@ module "workers" {
region = "${var.region}"
network = "${google_compute_network.network.name}"
count = "${var.worker_count}"
machine_type = "${var.machine_type}"
machine_type = "${var.worker_type}"
os_image = "${var.os_image}"
disk_size = "${var.disk_size}"
preemptible = "${var.worker_preemptible}"

View File

@ -34,10 +34,16 @@ variable "worker_count" {
description = "Number of workers"
}
variable "machine_type" {
type = "string"
default = "n1-standard-1"
description = "Machine type for compute instances (see `gcloud compute machine-types list`)"
variable controller_type {
type = "string"
default = "n1-standard-1"
description = "Machine type for controllers (see `gcloud compute machine-types list`)"
}
variable worker_type {
type = "string"
default = "n1-standard-1"
description = "Machine type for controllers (see `gcloud compute machine-types list`)"
}
variable "os_image" {