Fix overly strict firewall for GCP "worker pools"

* Fix issue where worker firewall rules didn't apply to
additional workers attached to a GCP cluster using the new
"worker pools" feature (unreleased, #148). Solves host
connection timeouts and pods not being scheduled to attached
worker pools.
* Add `name` field to GCP internal worker module to represent
the unique name of of the worker pool
* Use `cluster_name` field of GCP internal worker module for
passing the name of the cluster to which workers should be
attached
This commit is contained in:
Dalton Hubble
2018-03-03 16:21:38 -08:00
parent da6aafe816
commit 45b556c08f
5 changed files with 43 additions and 31 deletions

View File

@ -1,11 +1,16 @@
variable "cluster_name" {
variable "name" {
type = "string"
description = "Unique cluster name"
description = "Unique name"
}
variable "ssh_authorized_key" {
variable "cluster_name" {
type = "string"
description = "SSH public key for logging in as user 'core'"
description = "Cluster name"
}
variable "region" {
type = "string"
description = "Google Cloud region (e.g. us-central1, see `gcloud compute regions list`)."
}
variable "network" {
@ -21,11 +26,6 @@ variable "count" {
description = "Number of worker compute instances the instance group should manage"
}
variable "region" {
type = "string"
description = "Google Cloud region (e.g. us-central1, see `gcloud compute regions list`)."
}
variable "machine_type" {
type = "string"
default = "n1-standard-1"
@ -52,6 +52,16 @@ variable "preemptible" {
# configuration
variable "kubeconfig" {
type = "string"
description = "Generated Kubelet kubeconfig"
}
variable "ssh_authorized_key" {
type = "string"
description = "SSH public key for logging in as user 'core'"
}
variable "service_cidr" {
description = <<EOD
CIDR IP range to assign Kubernetes services.
@ -67,8 +77,3 @@ variable "cluster_domain_suffix" {
type = "string"
default = "cluster.local"
}
variable "kubeconfig" {
type = "string"
description = "Generated Kubelet kubeconfig"
}