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

feat: mount-volumes-for-ephemeral-containers policy #1225

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Darkhood148
Copy link

Related Issue(s)

#1088

Description

This PR adds a sample policy to mount volumes and set default security context for ephemeral containers; along with chainsaw tests for the same

Checklist

  • I have read the policy contribution guidelines.
  • I have added test manifests and resources covering both positive and negative tests that prove this policy works as intended.
  • I have added the artifacthub-pkg.yml file and have verified it is complete and correct.

@Darkhood148
Copy link
Author

Darkhood148 commented Jan 23, 2025

Hi @realshuting,

The description of the chainsaw tests is as follows:

  • Step 1: Create the policy
  • Step 2: Create a pod with the label ephemeral-debug: true and verify that the volume is added to the pod
  • Step 3: Verify the security context of a newly created ephemeral container by ensuring that it is a read-only file system
  • Step 4: Check if volumeMounts are being correctly added

Signed-off-by: Darkhood148 <[email protected]>
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.

1 participant