-
Notifications
You must be signed in to change notification settings - Fork 107
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 Support for Selinux Profile Binding #854
Conversation
|
Welcome @Vincent056! |
Hi @Vincent056. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
/ok-to-test |
Hey @Vincent056 glad to see you're starting to contribute here! Seems the PR has a merge conflict, so you'd need to fix that first. |
I also need to update the |
d50a2e6
to
2e00f70
Compare
You'll want to fix the verify issues, see e.g. https://github.com/kubernetes-sigs/security-profiles-operator/runs/5674912566?check_suite_focus=true |
Not sure why the patch shows up twice in GH, have you rebased atop origin/main (keep in mind that SPO doesn't use master anymore, but main...) |
Got
And did not realize I was using the old operator-sdk lol |
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, I left some comments inline, I think the PR is getting close!
errSeccomp := r.client.List(ctx, seccompProfiles, client.MatchingFields{linkedPodsKey: podID}) | ||
errSelinux := r.client.List(ctx, selinuxProfiles, client.MatchingFields{linkedPodsKey: podID}) | ||
|
||
if errSeccomp != nil && errSelinux != nil { |
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.
did you want to use '||' instead of '&&' here?
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.
this was intended, we don't want to continue if we can not list either seccomp profiles or selinux profiles
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.
Right, either. So there should be an OR, right? Otherwise if errSeccomp
is non-nil and errSelinux
is nil, the condition doesn't match and we continue.
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.
Yes, that's why I have separate check for errSeccomp
and errSelinux
after that
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.
Oh I get it now, but in case only one of the lists has an error, we don't reconcile again and just ignore the error. Is that OK?
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.
ahh I see, I guess I should use or here instead.
SPO should be using operator-sdk from |
094ae59
to
d9646cf
Compare
/retest |
Looks good except the one comment about the AND vs OR. In the meantime, @saschagrunert can you please allow GH actions to be ran? I can't seem to be able to do it |
afbaa43
to
d1bdaca
Compare
Sorry to bug again, wondering if anyone could approve the GH action workflows to run?, @saschagrunert @jhrozek Thanks |
e79bde3
to
5623351
Compare
This change updates binding webhook to support SelinuxProfile binding and updates ProfileBinding to allow SelinuxProfile as profile reference.
/retest |
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.
/lgtm
awesome work, thank you for the patience during the review!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhrozek, Vincent056 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 |
/kind feature
What this PR does / why we need it:
This change updates SPO binding webhook to support SelinuxProfile binding and updates ProfileBinding CRD to allow SelinuxProfile as a profile reference.
Does this PR have test?
Yes
Does this PR introduce a user-facing change?
Yes