CMP-4825: Add restricted:latest PodSecurity overrides to deployment e2e tests #1476
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 233 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.326
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #1476"
general
weight: 0.35
rhmdnd
Summary
Fix PodSecurity violations that cause the deployment e2e test suite (
e2e-aws-deployment) to fail on clusters enforcing therestricted:latestPodSecurity standard. The test suite has had a 0% pass rate for the last 90 days due to this issue.Problem
Six
oc runcommands intests/e2e/framework/utils.gocreate pods without specifying a security context that satisfiesrestricted:latest. The pods are rejected by PodSecurity admission, causing tests to retry in a loop until they time out (~36 minutes for the TLS tests), cascading into other test failures.Fix
Added a new
generateSecurityContextOverrides(image, command string)helper function — equivalent to the existinggeneratePodOverridesbut without thePrometheusTestSAservice account requirement (which TLS tests don't need). Applied--overrideswith properrestricted:latest-compliant PodSecurity context to all 6 affectedoc runcommands:AssertMetricsEndpointUsesHTTPVersion— metrics-test podgetMetricResults— metrics-test podAssertMetricsEndpointMinTLSVersion— tls-version-test podAssertResultServerMinTLSVersion— rs-tls-version-test pod (primary failure)AssertMetricsEndpointRejectsTLSVersion— tls-reject-test podAssertResultServerRejectsTLSVersion— rs-tls-reject-test podSwitched these functions from direct
exec.CommandtorunOCandGetOutputfor consistency with the existing working pattern used by the metrics-test and alertmanager-test pods.Validation
go vetandgo buildpass cleanly on./tests/e2e/framework/...Jira
CMP-4825
---
AI-generated. Review for accuracy.
@rhmdnd requested from Slack
[CMP-4825]: https://redhat.atlassian.net/browse/CMP-4825?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ