Ensure Security Context Compliance in Tests and User-Scaffolded Tests for Restricted Environments #4423
Labels
good first issue
Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
kind/feature
Categorizes issue or PR as related to a new feature.
priority/backlog
Higher priority than priority/awaiting-more-evidence.
What do you want to happen?
Background
To ensure compliance with restricted environments, all Pods in our tests and test scaffolds must use a Security Context. This ensures that even when namespaces enforce strict security policies, the tests will pass, and the scaffolds users rely on will remain functional.
Currently:
manager
is configured by default to work in such environments.curl
Pod (used to verify metrics logs) lacks the necessarySecurityContext
configuration.Tasks
1. Namespace Labeling for Security Policy Enforcement
testdata/project-v4/test/e2e/e2e_test.go#L51-L55
to scaffold the command that applies the required labels to the namespace.2. Secure
curl
Pod ConfigurationChange the
curl
Pod creation command intestdata/project-v4/test/e2e/e2e_test.go#L209-L217
to include a properSecurityContext
. For example:3. Update e2e Test Framework
test/e2e
to ensure that all created Pods include aSecurityContext
and are compatible with namespaces enforcing restricted security policies.Expected Outcome
Additional Notes
make generate
to ensure that all samples under docs and testdata are properly updated.Extra Labels
No response
The text was updated successfully, but these errors were encountered: