Skip to content

Commit d09a879

Browse files
committed
deprecate zone, support location
1 parent 829765a commit d09a879

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Based on https://github.com/tonglil/auth-gcloud.
1010
docker run \
1111
-e TOKEN="$(cat service-account.json)" \
1212
-e PROJECT=my-project \
13-
-e ZONE=us-central1-b \
13+
-e LOCATION=us-central1-b \
1414
-e CLUSTER=my-cluster \
1515
tonglil/auth-gke
1616
```
@@ -25,10 +25,14 @@ pipeline:
2525
image: tonglil/auth-gke
2626
environment:
2727
PROJECT: my-project
28-
ZONE: us-central1-b
28+
LOCATION: us-central1-b # zone or region
2929
CLUSTER: my-cluster
3030
commands:
3131
- auth-gke
3232
- kubectl ...
3333
secret: [google_credentials]
3434
```
35+
36+
## Changelog
37+
38+
See release notes: https://github.com/tonglil/auth-gke/releases

auth-gke.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euo pipefail
33

44
main() {
5-
_trace gcloud container clusters get-credentials "$CLUSTER" --project "$PROJECT" --zone "$ZONE"
5+
_trace gcloud container clusters get-credentials "$CLUSTER" --project "$PROJECT" --zone "${LOCATION:-$ZONE}"
66
}
77

88

0 commit comments

Comments
 (0)