-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add feature flag set-security-context-read-only-root-filesystem
to set readOnlyRootFilesystem for containers
#8186
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 feature flag set-security-context-read-only-root-filesystem
to set readOnlyRootFilesystem for containers
#8186
Conversation
Hi @kristofferchr. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind feature |
/test pull-tekton-pipeline-go-coverage-df |
@kristofferchr: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
set-security-context-read-only-root-filesystem
to add readOnlyRootFilesystem to containers
set-security-context-read-only-root-filesystem
to add readOnlyRootFilesystem to containersset-security-context-read-only-root-filesystem
to set readOnlyRootFilesystem to containers
set-security-context-read-only-root-filesystem
to set readOnlyRootFilesystem to containersset-security-context-read-only-root-filesystem
to set readOnlyRootFilesystem for containers
The following is the coverage report on the affected files.
|
acd8516
to
f0fecb9
Compare
The following is the coverage report on the affected files.
|
f0fecb9
to
46cb332
Compare
The following is the coverage report on the affected files.
|
/retest |
@kristofferchr: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
46cb332
to
68f73c6
Compare
68f73c6
to
1c3c312
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
1c3c312
to
1bbd67c
Compare
The following is the coverage report on the affected files.
|
1bbd67c
to
5516ec0
Compare
The following is the coverage report on the affected files.
|
Prior to this change it was not possible to set readOnlyRootFilesystem for tekton pipeline containers. This change allows users to set readOnlyRootFilesystem in container securityContext for all containers. Aligns tekton with industry best practices for kuberenetes security, such as Azure Kubernetes Services deployment safeguards.
5516ec0
to
1fe2500
Compare
The following is the coverage report on the affected files.
|
Is this ok-to-test @vdemeester ? |
@kristofferchr yes, it is ok, and test rans.. But you will probably need to rebase or commit/amend/push to force the new workflow to run (we moved some of them 🙏🏼 ) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester 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 |
/ok-to-test |
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.
Thank you for this!
/lgtm
@@ -0,0 +1,21 @@ | |||
# Copyright 2021 The Tekton Authors |
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.
NIT: this is a new file, so the data should be 2025
@@ -0,0 +1,67 @@ | |||
/* | |||
Copyright 2024 The Tekton Authors |
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.
NIT: 2025
- `set-security-context-read-only-root-filesystem`: Set this flag to `true` to enable `readOnlyRootFilesystem` in the | ||
security context for containers injected by Tekton. This makes the root filesystem of the container read-only, | ||
enhancing security. Note that this requires `set-security-context` to be enabled. By default, this flag is set | ||
to `false`. Note: This feature does not work in windows as it is not supported there, [Comparison with linux](https://kubernetes.io/docs/concepts/windows/intro/#compatibility-linux-similarities). |
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.
+1
Solves: #8183
Changes
Add a flag to enable setting the readOnlyRootFilesystem field in the securityContext for containers used in pipelinerun, taskrun and affinity assistants
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes