Skip to content

Commit eb2ba74

Browse files
Update kubectl-plugin/pkg/cmd/get/get_token.go
Co-authored-by: Han-Ju Chen (Future-Outlier) <eric901201@gmail.com> Signed-off-by: Rueian <rueiancsie@gmail.com>
1 parent 25e438a commit eb2ba74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kubectl-plugin/pkg/cmd/get/get_token.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (options *GetTokenOptions) Run(ctx context.Context, k8sClient client.Client
8080
if err != nil {
8181
return fmt.Errorf("failed to get secret %s/%s: %w", options.namespace, options.cluster, err)
8282
}
83-
if token, ok := secret.Data["auth_token"]; ok {
83+
if token, ok := secret.Data[utils.RAY_AUTH_TOKEN_SECRET_KEY]; ok {
8484
_, err = fmt.Fprint(options.ioStreams.Out, string(token))
8585
} else {
8686
err = fmt.Errorf("secret %s/%s does not have an auth_token", options.namespace, options.cluster)

0 commit comments

Comments
 (0)