-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deploy/gcp: support zonal and multi-zonal cluster #809
Conversation
@gregwebs @tennix @jlerche @aylei Known issues:
|
description = "Operator helm values" | ||
type = string | ||
default = "" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declare it in root module to make it configurable
description = "Kubernetes version to use for the GKE cluster" | ||
type = string | ||
default = "latest" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declare it in root module to make it configurable
|
||
variable "tidb_replica_count" { | ||
default = 3 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these three variables are not used anymore
variable "gcp_region" { | ||
description = "The GCP region" | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced by location
145f378
to
e8ed70d
Compare
} | ||
|
||
variable "node_locations" { | ||
description = "The list of zones in which the cluster's nodes should be located. These must be in the same region as the cluster zone for zonal clusters, or in the region of a regional cluster. In a multi-zonal cluster, the number of nodes specified in initial_node_count is created in all specified zones as well as the primary zone. If specified for a regional cluster, nodes will be created in only these zones." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this for a single-zone cluster? Doesn't the above location variable already specify this properly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see, there are zonal clusters that are multi-zone clusters. I wonder why not just use the regional cluster though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, if you need to run a multi-zone cluster, it's better to use a regional cluster. However, if users want a small cluster for testing or for low network latency between work nodes, they can use a zonal cluster and run nodes in a single zone.
node_locations
can also be used to choose node locations for the regional cluster too (at least two locations for a regional cluster).
Currently, in GCP, some types of machines are only available in a few zones, e.g. in region us-central1
c2-standard machines are only available in us-central1-b
and us-central1-c
zones.
If users want to use these compute-optimized machines, they must specify node_locations
to deploy nodes in these zones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-e2e-in-kind |
/run-e2e-in-kind |
@gregwebs @aylei |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What problem does this PR solve?
What is changed and how does it work?
Check List
Tests
Side effects
Related changes
Does this PR introduce a user-facing change?: