1
0
Fork 0
mirror of https://github.com/imjasonh/gke-auth synced 2026-07-07 00:23:18 +00:00
Commit graph

21 commits

Author SHA1 Message Date
minhthong582000
8f2b6af6f1 Add --alias flag to customize kubeconfig context name
By default the context/cluster/user entries in kubeconfig are named
gke_{project}_{location}_{cluster}, which is verbose and hard to type.
Add --alias so users can set a short, memorable name instead.
2026-06-05 02:04:21 +07:00
Kevin Davis
bf4257295b
Also request https://www.googleapis.com/auth/userinfo.email scope
The gcloud cred helper [requests these scopes](c19c59784d/cmd/gke-gcloud-auth-plugin/default_credentials_token_provider.go (L17-L19)) when obtaining a token. Without this scope, service accounts authenticate to GKE as their unique ID, which means the RBAC policies must do the same. This is inconvenient when authoring policies since it's hard to reason about which authentication flows will use the email vs unique ID.
2025-05-16 15:12:49 -05:00
Jason Hall
4559a19503
fix nil panic when existing config is empty
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-03-19 15:31:56 -04:00
Jason Hall
d07111e3f5
make registry auth optional, must specify location
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-03-17 13:52:22 -04:00
Jason Hall
3517929a83
also setup docker cred helper
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-03-14 15:20:23 -04:00
Eddie Zaneski
023a35d802
Use clientcmd LoadingRules
Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>
2022-06-16 16:28:56 -06:00
31f5c5f164
drop GKE API dependency 2022-06-16 15:49:29 -04:00
b50cb1945a
use os.UserHomeDir(), add --clear and more validation 2022-06-16 15:13:57 -04:00
e3ca1a506e
try using TokenSource 2022-06-16 13:03:27 -04:00
9ab9b99e07
use gke client, but also use ExecConfig 2022-06-16 12:59:45 -04:00
4bb5390233
try the old way again, idk 2022-06-16 12:56:04 -04:00
74a0648349
fix auth scope 2022-06-16 12:04:21 -04:00
638948f2ec
Use ExecConfig 2022-06-15 23:34:33 -04:00
Jason Hall
685cd76d8a Remove GKE API client library dep 2022-03-28 11:27:37 -04:00
Jason Hall
49572ecd9a create the file or whatever ugh 2022-03-11 14:32:35 -05:00
Jason Hall
a250c8461f yolo 2022-03-11 14:28:55 -05:00
Jason Hall
943bc70d2d create kubeconfig dir if it doesn't exist 2022-03-11 14:27:08 -05:00
Jason Hall
89acc037c8 create kubeconfig if it doesn't exist, document IAM role 2022-03-11 14:08:43 -05:00
Jason Hall
0202173b54 add scope 2022-03-11 13:57:39 -05:00
Jason Hall
733f2e36be moar logging 2022-03-11 13:30:52 -05:00
Jason Hall
cdd6037736 initial commit 2022-03-09 16:16:14 -05:00