-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
docs: Document access token creation and usage #3316
Conversation
docs/access-token.md
Outdated
You now need to get a token: | ||
|
||
```shell script | ||
SECRET=$(kubectl get secret -o name | grep '^secret/jenkins-token-' | sed 's/secret\///') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to decode the token.
A workable script:
ARGO_TOKEN=$(kubectl -n argo get secret `kubectl -n argo get sa jenkins -o=jsonpath='{.secrets[0].name}'` -o=jsonpath='{.data.token}' | base64 --decode)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - really good. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Following part is not related, but it looks confusing - Kubeconfig base 64 encoded
in rest-api.md
.
The server can be configured with or without client auth (`server --auth-mode client`). When it is disabled, then clients must pass their Kubeconfig base 64 encoded in the HTTP `Authorization` header:
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.Changes
This PR documents how to create a token suitable for automation - i.e. an "access token"