Skip to content

[BugFix]Allow ImageVolume for Restricted PSA profiles #130394

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

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

Barakmor1
Copy link
Contributor

Stop referring to ImageVolume as an unknown type during pod security admission validation. Avoid restricting ImageVolume for the Restricted profile, as users who can create a pod with a certain image should also be able to use ImageVolume with an image.

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Allow ImageVolume for Restricted PSA profiles

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 24, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

Hi @Barakmor1. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. sig/auth Categorizes an issue or PR as relevant to SIG Auth. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 24, 2025
Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, this looks reasonable to me

Please add to the TestRestrictedVolumes unit test to exercise this case

I think this should merge before the ImageVolume feature is promoted to beta (xref #130135 (comment))

@Barakmor1
Copy link
Contributor Author

I think this should merge before the ImageVolume feature is promoted to beta (xref #130135 (comment))

@liggitt There is also: #130231

Stop referring to ImageVolume as an unknown type during pod security admission validation.
Avoid restricting ImageVolume for the Restricted profile, as users who can create a pod
with a certain image should also be able to use ImageVolume with an image.

Signed-off-by: bmordeha <bmordeha@redhat.com>
@liggitt
Copy link
Member

liggitt commented Feb 24, 2025

thanks for the link there as well... for the folks driving the promotion to beta, please ensure these updates get reflected back in the list of updates for the KEP / feature, and that there is test coverage added to exercise those gaps

@Barakmor1
Copy link
Contributor Author

Please add to the TestRestrictedVolumes unit test to exercise this case

Done

@liggitt
Copy link
Member

liggitt commented Feb 24, 2025

/kind bug
/kind feature
/ok-to-test
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 24, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. label Feb 24, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 24, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c5129d5014ad2c405161839972f03625132c5c21

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 24, 2025
@Barakmor1
Copy link
Contributor Author

Can we back-port this?

@liggitt
Copy link
Member

liggitt commented Feb 24, 2025

No, only security fixes, dataloss fixes, and regression fixes are backported.

Specifically, bugfixes for alpha off-by-default features are not eligible for backport.

See https://github.com/kubernetes/community/blob/master/contributors/devel/sig-release/cherry-picks.md#what-kind-of-prs-are-good-for-cherry-picks for details

@Barakmor1
Copy link
Contributor Author

No, only security fixes, dataloss fixes, and regression fixes are backported.

This essentially means that we might not be able to use or test this feature in KubeVirt unless the Kubernetes version is higher than 1.32, even if it's protected by a feature gate on our side :\

@liggitt
Copy link
Member

liggitt commented Feb 24, 2025

This essentially means that we might not be able to use or test this feature in KubeVirt unless the Kubernetes version is higher than 1.32, even if it's protected by a feature gate on our side :\

you can, you just need to opt the test namespace into baseline PSA mode or higher until getting this fix in 1.33

@Barakmor1
Copy link
Contributor Author

you can, you just need to opt the test namespace into baseline PSA mode or higher until getting this fix in 1.33

In KubeVirt, the requirements for new features are a bit different. I'm not sure if this limitation will be accepted, but I'll look into it. Thanks for the info! :)

@Barakmor1
Copy link
Contributor Author

FYI @vladikr

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Barakmor1, liggitt, saschagrunert

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 3985b78 into kubernetes:master Feb 24, 2025
13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants