OCPBUGS-131838: support karpenter operand UID without scc #61
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
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.328
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #61"
general
weight: 0.35
maxcao13
On management clusters without SCC admission, such as AKS, images that default to root cannot start with
runAsNonRootenabled unless an explicit non-root UID is supplied.aws-karpenter-provider-awsimage default user:We can't arbitrarily set a
runAsUserto the operand pod or containers because a UID like1002might 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-uidannotation (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 throughDEFAULT_SECURITY_CONTEXT_UID(a separate PR inopenshift/hypershiftto allow this exists here: https://github.com/openshift/hypershift/pull/10024).The operator uses that value for the operand pod’s
runAsUserandfsGroup, while retainingrunAsNonRoot: 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.