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

Needs to use --gke-uri instead of --gke-cluster in a multi-project scenario #837

Closed
qingvincentyin opened this issue Feb 28, 2021 · 0 comments · Fixed by #840
Closed

Needs to use --gke-uri instead of --gke-cluster in a multi-project scenario #837

qingvincentyin opened this issue Feb 28, 2021 · 0 comments · Fixed by #840
Assignees
Labels
bug Something isn't working good first issue Good for newcomers P3 medium priority issues triaged Scoped and ready for work

Comments

@qingvincentyin
Copy link

qingvincentyin commented Feb 28, 2021

gcloud container hub memberships register "${MEMBERSHIP_NAME}" --gke-cluster="${CLUSTER_LOCATION}"/"${CLUSTER_NAME}" --service-account-key-file="${tmp_file}" --project="${PROJECT_ID}" --quiet

Suppose a GKE cluster resides in GKE_PROJECT_ID different from HUB_PROJECT_ID. In such a multi-project registration scenario, the command line param --gke-cluster won't work. I believe we'd have to use the --gke-uri param instead.

BTW, --project in this command refers to the HUB_PROJECT_ID. When GKE_PROJECT_ID == HUB_PROJECT_ID, this distinction isn't important. But in a multi-project registration scenario, it is better to rename ${PROJECT_ID} to ${HUB_PROJECT_ID} in order to be more clear on the concept.

@morgante morgante added bug Something isn't working good first issue Good for newcomers P3 medium priority issues triaged Scoped and ready for work labels Mar 1, 2021
JamesDuncanNz added a commit to JamesDuncanNz/terraform-google-kubernetes-engine that referenced this issue Mar 3, 2021
Added an optional variable HUB_PROJECT_ID which will allow you to specific a seperate
GCP project for the GKE HUB than the project the cluster is deployed to.

This included updating the 3 examples the leveraged the hub module.

Issue: terraform-google-modules#837
JamesDuncanNz added a commit to JamesDuncanNz/terraform-google-kubernetes-engine that referenced this issue Mar 4, 2021
Ensuring that the Hub default Service Account exists
when adding a cluster from outside the hub project

Issue: terraform-google-modules#837
JamesDuncanNz added a commit to JamesDuncanNz/terraform-google-kubernetes-engine that referenced this issue Mar 4, 2021
JamesDuncanNz added a commit to JamesDuncanNz/terraform-google-kubernetes-engine that referenced this issue Mar 8, 2021
bharathkkb added a commit that referenced this issue Mar 9, 2021
* Added support for multi-project GKE Hub registration

Added an optional variable HUB_PROJECT_ID which will allow you to specific a seperate
GCP project for the GKE HUB than the project the cluster is deployed to.

This included updating the 3 examples the leveraged the hub module.

Issue: #837

* Adding service idenity resource for multi project deployments

Ensuring that the Hub default Service Account exists
when adding a cluster from outside the hub project

Issue: #837

* Fixing bharathkkb comments

Fixes #837

* Fix linting issue

* Removed Google project data souce

Issue: #837

* Adding upgrade documentation for this change.

* Lint updates on readme.

Co-authored-by: James Duncan <jdun@google.com>
Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this issue Jul 15, 2024
…m-google-modules#840)

* Added support for multi-project GKE Hub registration

Added an optional variable HUB_PROJECT_ID which will allow you to specific a seperate
GCP project for the GKE HUB than the project the cluster is deployed to.

This included updating the 3 examples the leveraged the hub module.

Issue: terraform-google-modules#837

* Adding service idenity resource for multi project deployments

Ensuring that the Hub default Service Account exists
when adding a cluster from outside the hub project

Issue: terraform-google-modules#837

* Fixing bharathkkb comments

Fixes terraform-google-modules#837

* Fix linting issue

* Removed Google project data souce

Issue: terraform-google-modules#837

* Adding upgrade documentation for this change.

* Lint updates on readme.

Co-authored-by: James Duncan <jdun@google.com>
Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers P3 medium priority issues triaged Scoped and ready for work
Projects
None yet
3 participants