-
Notifications
You must be signed in to change notification settings - Fork 486
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
config-reloader: change to non-root user #4235
Conversation
operatorContainers := []core_v1.Container{ | ||
{ | ||
Name: "config-reloader", | ||
Image: imagePathConfigReloader, | ||
VolumeMounts: volumeMounts, | ||
Env: envVars, | ||
SecurityContext: &core_v1.SecurityContext{ | ||
RunAsUser: pointer.Int64(0), |
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.
@rfratto is there a specific reason why this was initially configured to run as root? do you see any problems with this?
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.
Probably just me being aggressive with copy and paste, I think it's safe to remove.
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.
Sorry this took so long to merge. Thanks for the contribution!
PR Description
Force the
config-reloader
container to run as root is not practical in platform that are under rigorous security constraints (ex: Openshift).Unless I am missing a specific situation, I suggest to setup the security context of this container, the same way the Prometheus Operator does. See prometheus-operator/prometheus-operator config_reloader.go#L256-L262
Which issue(s) this PR fixes
Notes to the Reviewer
PR Checklist