-
Notifications
You must be signed in to change notification settings - Fork 328
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
chore: adding CEL for psp-host-namespaces #603
base: master
Are you sure you want to change the base?
chore: adding CEL for psp-host-namespaces #603
Conversation
Signed-off-by: Jaydip Gabani <[email protected]>
variables: | ||
- name: sharingNamespace | ||
expression: | | ||
has(variables.anyObject.spec.hostPID) || has(variables.anyObject.spec.hostIPC) ? variables.anyObject.spec.hostPID || variables.anyObject.spec.hostIPC : false |
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 think this is vulnerable to failing on nil.
Suggest splitting this in to two variables:
- get hostIPC if exists, false otherwise
- same for hostPID
- test the downstream variables
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.
Updated the code. PTAL @maxsmythe
Signed-off-by: Jaydip Gabani <[email protected]>
This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
What this PR does / why we need it:
Which issue(s) does this PR fix (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #
Special notes for your reviewer: