Skip to content
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

fix: procmount should allow empty values #621

Merged

Conversation

Agalin
Copy link
Contributor

@Agalin Agalin commented Jan 10, 2025

What this PR does / why we need it:

There is a mismatch between existing Rego and CEL implementation. Rego allows not providing proc mount value at all while CEL needs a value. Both fail if procMount is set to null despite it being a valid value equivalent to not defining the key at all.

This mismatch actually causes admission errors after updating to the version with CEL logic for all pods with not defined procMount (i.e. vast majority).

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:

@Agalin Agalin requested a review from a team as a code owner January 10, 2025 16:23
Copy link
Contributor

@JaydipGabani JaydipGabani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! thanks for the PR!

@JaydipGabani
Copy link
Contributor

@Agalin Please sign the commit to fix DCO CI failure.

@Agalin Agalin force-pushed the proc-mount-missing-fix branch from 688b0d5 to 89a04df Compare January 13, 2025 09:10
@Agalin
Copy link
Contributor Author

Agalin commented Jan 13, 2025

Sure thing! Added.

@JaydipGabani JaydipGabani requested a review from a team January 13, 2025 19:04
Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JaydipGabani JaydipGabani enabled auto-merge (squash) January 15, 2025 22:00
auto-merge was automatically disabled January 16, 2025 11:57

Head branch was pushed to by a user without write access

@Agalin Agalin force-pushed the proc-mount-missing-fix branch from 89a04df to d49a7a8 Compare January 16, 2025 11:57
@Agalin
Copy link
Contributor Author

Agalin commented Jan 16, 2025

@JaydipGabani looks like it was stuck waiting on automerge, I've rebased it. 🤷

@Agalin
Copy link
Contributor Author

Agalin commented Jan 17, 2025

Looks like this failure is also happenning on the master branch.

@JaydipGabani
Copy link
Contributor

@Agalin This should be fixed after #625 is merged.

@JaydipGabani
Copy link
Contributor

@Agalin CI issues is now fixed, if you rebase/merge msater CI should pass now.

There is a mismatch between existing Rego and CEL implementation. Rego allows not providing proc mount value at all while CEL needs a value. Both fail if procMount is set to `null` despite it being a valid value equivalent to not defining the key at all.

Signed-off-by: Szymon Soloch <[email protected]>
@Agalin Agalin force-pushed the proc-mount-missing-fix branch from d49a7a8 to 5519039 Compare January 17, 2025 21:30
@Agalin
Copy link
Contributor Author

Agalin commented Jan 17, 2025

@JaydipGabani rebased, hopefully we'll be able to merge it now.

@JaydipGabani JaydipGabani merged commit 4416aa1 into open-policy-agent:master Jan 17, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants