-
Notifications
You must be signed in to change notification settings - Fork 20
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
Use the most restrictive service account possible #211
Use the most restrictive service account possible #211
Conversation
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/56b05f9b280a42b88626ffbc6c3a0935 ✔️ openstack-k8s-operators-content-provider SUCCESS in 4h 28m 30s |
/retest |
recheck |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/54961a06a5914faf961d899fa6ef49ba ✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 39m 56s |
b72fc8b
to
0233716
Compare
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
0233716
to
9f0a276
Compare
The commits need to be cleaned up otherwise this should be good for a review and to be merged. |
5b0db4d
to
120e74f
Compare
120e74f
to
130aaab
Compare
controllers/common.go
Outdated
if privileged { | ||
rbacPolicyRules = append(rbacPolicyRules, rbacv1.PolicyRule{ | ||
APIGroups: []string{"security.openshift.io"}, | ||
ResourceNames: []string{"anyuid", "privileged"}, |
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.
I've been just testing the change and we have to enable at least anyuid
by default. Marking as draft to prevent from merging.
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.
Ok, so the correct thing would be to use nonroot
and nonroot-v2
when privileged: false
.
8eb89ec
to
21f71d5
Compare
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/075b08fe8a6f4ae2a4df674867e9f575 ✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 28m 09s |
4fad2a8
to
dff1d50
Compare
This change depends on a change that failed to merge. Change openstack-k8s-operators/ci-framework#2448 is needed. |
recheck |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/a073abd0643f4fb5864c8fb8725da8bd ✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 20m 21s |
recheck |
recheck |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/9411c73543604f498d0c9beaae0d30f7 ✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 34m 34s |
dff1d50
to
0b99d45
Compare
/retest |
aa9a1f1
to
cd2908a
Compare
/retest |
This patch triages the rights that are assigned to serviceAccounts that are related to the test-operator: - serviceAccount used by the test-operator controller - serviceAccount that is associated with instances of test-operator related CRs.
Previously, the test-operator was spawning pods with NET_ADMIN and NET_RAW capabilities even when privileged: false. Setting these two capabilities requires elevated securitycontextconstraint. This commit addresses this issue by using extra capabilities only when privileged: true.
This commit removes the default value of SELinuxLevel. This option should be only used when privileged: true because scc privileged is required when setting SELinuxLevel on a pod. Setting SELinuxLevel is sometimes required in order to be able to allow RWX for a mounted PVC. We're going to move the setting of the SELinuxLevel to ci-framework and leave the default parameters for the test-operator secure. Depends-On: openstack-k8s-operators/ci-framework#2448
This patch updates the test-operator CSV so that it is up to date with the recent changes.
cd2908a
to
ca67497
Compare
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.
seems reasonable
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kopecmartin, lpiwowar 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 |
eae3554
into
openstack-k8s-operators:main
This PR ensures that the test-operator spawns test pods with the least amount of privileges that are required for successful execution of the tests inside the pods. Three changes had to be made:
privileged: false
privileged: false
. This required to run the test pod with privileged scc.privileged: true
is used).Depends-On: openstack-k8s-operators/ci-framework#2448