1
0
mirror of https://github.com/google/nomulus synced 2026-01-07 14:05:44 +00:00

Pull nomulus cluster credentials from the fleet (#2643)

After private endpoint is enabled, we cannot pull the credentials
directly via `gcloud containers cluster get-credentials`.
This commit is contained in:
Lai Jiang
2025-01-16 10:06:02 -05:00
committed by GitHub
parent 45c8b81823
commit 9f22f2e8ae

View File

@@ -17,6 +17,9 @@
# kills all running pods to force k8s to create new pods using the just-pushed # kills all running pods to force k8s to create new pods using the just-pushed
# manifest. # manifest.
# Abort on error.
set -e
if [[ $# -ne 2 ]]; then if [[ $# -ne 2 ]]; then
echo "Usage: $0 alpha|crash|qa [base_domain]}" echo "Usage: $0 alpha|crash|qa [base_domain]}"
exit 1 exit 1
@@ -30,8 +33,7 @@ while read line
do do
parts=(${line}) parts=(${line})
echo "Updating cluster ${parts[0]} in location ${parts[1]}..." echo "Updating cluster ${parts[0]} in location ${parts[1]}..."
gcloud container clusters get-credentials "${parts[0]}" \ gcloud container fleet memberships get-credentials "${parts[0]}" --project "${project}"
--project "${project}" --location "${parts[1]}"
for service in frontend backend pubapi console for service in frontend backend pubapi console
do do
sed s/GCP_PROJECT/"${project}"/g "./kubernetes/nomulus-${service}.yaml" | \ sed s/GCP_PROJECT/"${project}"/g "./kubernetes/nomulus-${service}.yaml" | \