Skip to content
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

impersonation: Clear config.BearerTokenFile when setting BearerToken. #258

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

nairb774
Copy link
Contributor

When running in a cluster, the BearerTokenFile is set to point to
/var/run/secrets/kubernetes.io/serviceaccount/token where the service
account's token is auto-mounted. If this value is not cleared, the
setting of the BearerToken field will have no effect. Relevant
documentation:
https://pkg.go.dev/k8s.io/client-go@v0.20.2/rest#Config.BearerTokenFile

When running in a cluster, the BearerTokenFile is set to point to
`/var/run/secrets/kubernetes.io/serviceaccount/token` where the service
account's token is auto-mounted. If this value is not cleared, the
setting of the BearerToken field will have no effect. Relevant
documentation:
https://pkg.go.dev/k8s.io/client-go@v0.20.2/rest#Config.BearerTokenFile

Signed-off-by: Brian Atkinson <brian@atkinson.mn>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @nairb774 good catch!

@stefanprodan stefanprodan merged commit 9ad68d9 into fluxcd:main Jan 26, 2021
@nairb774 nairb774 deleted the priceless_meitner branch January 26, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants