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

Handle PersistenVolumeClaimTemplate defined by EphemeralVolumeSource #3

Open
flavio opened this issue Mar 21, 2024 · 0 comments
Open
Labels
area/policy kind/enhancement New feature or request

Comments

@flavio
Copy link
Member

flavio commented Mar 21, 2024

The Volume resource has an attributed called ephemeral of type EphemeralVolumeSource, which has inside of itself the volumeClaimTemplate of type VolumeClaimTemplate. The PersistentVolumeClaimTemplate can reference a storageClass. This is the same type of object defined inside of StatefulSet.spec.persistentVolumeClaimTemplates (see #1).

The policy should be extended to look also inside of the podSpec.volumes.*.ephemeral.volumeClaimTemplate.spec.storageClassName. Given podSpec are embedded into higher level Kubernetes resources; the policy should be capable of inspecting Pod, Deployment, CronJob, StatefulSet.

When inspecting StatefulSet objects, we have to be careful because the PVC can be defined in two places: inside of the podSpec (with this convoluted series of objects) and also inside of volumeClaimTemplates (which is handled by #1).

Configuration

The configuration settings of the policy do not need to be changed. They are going to be applied in the same way

@jvanz jvanz added this to Kubewarden Mar 27, 2024
@jvanz jvanz added kind/enhancement New feature or request area/policy labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/policy kind/enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants