← Back to Pull requests

helm/topology-aware: add OpenShift SCC support #766

Closed
unknown closed this pull request without merging on Aug 21, 2026 13:06 UTC
View on GitHub
unknown unknown commented on Aug 21, 2026 10:48 UTC
Author

This is a direct liftover of / shamelessly stolen from the corresponding balloons PR #750/commit de76f63b850d803d26abeccf85893781fb257410, applied to the topology-aware policy which now has CpuClass/PCT support. All credits go to @kwisniewski98. Any potential problems are my fault.

On OpenShift, pod admission is gated by SecurityContextConstraints. The policy plugin DaemonSet mounts host paths (/sys, /proc, /var/run/nri, the kubelet pod-resources socket) and runs privileged when allowPCT is set, but no SCC assigned to the plugin ServiceAccount by default admits that pod, so its pods are rejected on a stock OpenShift cluster.

Add an openshift.grant-scc value (default false, no effect on vanilla Kubernetes) that grants the plugin ServiceAccount an SCC matched to the mode it runs in:

- allowPCT=true -> bind to the built-in privileged SCC via the cluster role system:openshift:scc:privileged (the pod is privileged and mounts host /dev for SST access).

- allowPCT=false -> a dedicated least-privilege SCC that permits only what the non-privileged pod needs: hostPath volumes, but no privilege, no privilege escalation, all capabilities dropped, and no host namespaces.

Both cases use a namespaced RoleBinding and avoid any cluster-wide grant of use.

In the non-privileged (allowPCT=false) case the pod is otherwise confined as container_t, which cannot write the plugin's hostPath data dir under SELinux. Request the spc_t SELinux type in that path (gated on openshift.grant-scc, so vanilla Kubernetes stays confined) so the pod can function while remaining non-privileged.

Diff: 201 lines (+150 / -51) across 2 files Reviewer: kad Review duration: 138m
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.59) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 201 lines diff across 2 files
0.59
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.318
Shallow Review Depth shallow_review_depth
0.289
Sensitive Paths sensitive_paths
0.059
Real PR Conversation Timeline
1 comments
"Review active on #766"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 59.4% (MEDIUM) · Higher = larger blast radius
59.4%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 23.5% · Safe to merge
23.5%