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

Document need for permission to /livez/ping #1411

Closed
carlpett opened this issue Mar 21, 2024 · 1 comment · Fixed by fluxcd/flux2#4687
Closed

Document need for permission to /livez/ping #1411

carlpett opened this issue Mar 21, 2024 · 1 comment · Fixed by fluxcd/flux2#4687

Comments

@carlpett
Copy link

When source-controller starts, it apparently tries to make a request to /livez/ping on the api server (right?), which is not covered by the recommended RBAC settings. This doesn't seem to have any effect on the controller working or not, but it does lead to a security event on every start (forbidden: User "system:serviceaccount:flux-system:source-controller" cannot head path "/livez/ping").

I don't see any explicit calls to this endpoint in code for source-controller, but I did find a mention in the cli-utils repo: https://github.com/fluxcd/cli-utils/blob/5af6753e42af4622cd7d6e16ffe1fb2f946a2103/pkg/flowcontrol/flowcontrol.go. The file appears vendored from upstream Kubernetes stuff, so (speculation ahead) perhaps the same code is run as part of imported packages in the source-controller?

Should it be documented that this is required, or can the call be disabled somehow if not needed?

@stefanprodan
Copy link
Member

All Flux controllers call the flow control API at startup to determine the rate limits enforced by the Kubernetes API. We should add this endpoint to https://github.com/fluxcd/flux2/blob/main/manifests/rbac/controller.yaml. Could you please open a PR for this in flux2 repo? Thanks

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 a pull request may close this issue.

2 participants