Skip to content
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: Retrieve real number of node locations of the cluster #801

Merged
merged 2 commits into from
Aug 21, 2019

Conversation

cofyc
Copy link
Contributor

@cofyc cofyc commented Aug 21, 2019

What problem does this PR solve?

by default, the regional cluster will choose 3 from all available zones. However, there are 4 zones in us-central1 region.

Currently, we need to use gcloud command to retrieve the real number of node locations of the cluster.

See discussion: #788 (comment)

What is changed and how does it work?

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Does this PR introduce a user-facing change?:

NONE

# TODO Update related code when node locations is avaiable in attributes of cluster resource.
cmd_get_cluster_locations = <<EOT
gcloud --project ${var.gcp_project} container clusters list --filter='name=${var.gke_cluster_name}' --format='json[no-heading](locations)' --region ${var.gke_cluster_location} | jq '.[0] | .locations |= join(",")'
EOT
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example output:

{
  "locations": "us-central1-b,us-central1-c,us-central1-f"
}

@gregwebs
Copy link
Contributor

/run-e2e-tests

@gregwebs gregwebs merged commit bbcc367 into pingcap:master Aug 21, 2019
yahonda pushed a commit that referenced this pull request Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants