← Back to Pull requests

OCPBUGS-131838: support karpenter operand UID without scc #61

Closed
unknown closed this pull request without merging on Oct 21, 2026 20:06 UTC
View on GitHub
unknown unknown commented on Oct 16, 2026 21:35 UTC
Author

On management clusters without SCC admission, such as AKS, images that default to root cannot start with runAsNonRoot enabled unless an explicit non-root UID is supplied.

aws-karpenter-provider-aws image default user:

$ skopeo inspect --config docker://registry.ci.openshift.org/ocp/5.0:aws-karpenter-provider-aws | jq '.config.User'
"0"

We can't arbitrarily set a runAsUser to the operand pod or containers because a UID like 1002 might fall out of the namespace's allowed range. Instead, we leverage an existing hypershift capability that no longer works out of the box (since we move the owner of karpenter from hypershift-operator -> karpenter-operator).

HyperShift already allocates a non-root UID for each hosted control plane namespace when SCC is unavailable and records it in the hypershift.openshift.io/default-security-context-uid annotation (code ref). Previously, HyperShift applied its security-context defaults directly to the Karpenter deployment. Now that karpenter-operator manages that deployment, HyperShift should pass the allocated UID to the operator through DEFAULT_SECURITY_CONTEXT_UID (a separate PR in openshift/hypershift to allow this exists here: https://github.com/openshift/hypershift/pull/10024).

The operator uses that value for the operand pod’s runAsUser and fsGroup, while retaining runAsNonRoot: true. When the variable is unset, both fields remain unspecified so OpenShift SCC admission (e.g., on openshift management clusters) can assign them.

see verification here (since we don't have e2e yet): https://github.com/openshift/karpenter-operator/pull/61#issuecomment-6225444853

Code changes look huge, but it's really not. It's a bunch of test line changes.

Diff: 238 lines (+178 / -60) across 2 files Reviewer: maxcao13 Review duration: 7110m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 238 lines diff across 2 files
0.37
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.328
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #61"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
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: 37.2% (MEDIUM) · Higher = larger blast radius
37.2%
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: 14.7% · Safe to merge
14.7%