-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add securityContext to controller pod #346
Add securityContext to controller pod #346
Conversation
This commit adds securityContext to the controller pod which has been missing till now. This is in line with securityContext in other Tekton components like pipeline and triggers. There are a few reasons why securityContext is important to add to the controller: - the securityContext specifies the user and group as 65532 which is what is used by the distroless nonroot image that ko uses in the controller image. - securityContext is also useful in distributions like OpenShift which assign a random user while running a pod. If securityContext is not set, the controller fails with permission denied errors like in tektoncd#320
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.
+:100: for consistency with the rest of the component controller's deployment
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.
thanks for fixing this!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, priyawadhwa The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
This commit adds securityContext to the controller pod which has been
missing till now. This is in line with securityContext in other Tekton
components like pipeline and triggers.
There are a few reasons why securityContext is important to add to the
controller:
what is used by the distroless nonroot image that ko uses in the
controller image.
assign a random user while running a pod. If securityContext is not
set, the controller fails with permission denied errors like in Error uploading signature and attestation #320