CNTRLPLANE-4463: stop PSA label syncer on an enabled or missing gate #215
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.42) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 343 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.349
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #215"
general
weight: 0.35
liouk
OpenShift and HyperShift stop writing
enforcelabels, even during an upgrade or a rollback. MicroShift keeps them.Part of openshift/enhancements#2169 (CNTRLPLANE-4463).
| feature gates passed | before | after |
| ------------------------------------- | --------- | ----------- |
| none (MicroShift) | enforcing | enforcing |
|
OpenShiftPodSecurityAdmission=false| advising | advising ||
OpenShiftPodSecurityAdmission=true| enforcing | not started || gate not listed | enforcing | not started |
Why: during an upgrade or a rollback, cluster-policy-controller can start with the feature gates of another release. Today everything except
=falseenforces, so an enabled gate, or one already removed fromopenshift/api, bringsenforcelabels back. MicroShift passes no feature gates at all, while OpenShift and HyperShift pass every gate, enabled or disabled. Therefore an empty list is the only safe signal for MicroShift.Commits: the behaviour change, then a no-op extraction of
psaLabelSyncerModeForwith a table test, then docs. A unit test is the only way to cover "gate not listed", as no cluster sends such a list whileopenshift/apideclares the gate.Merge order: the gate is enabled on
TechPreviewNoUpgradeandDevPreviewNoUpgrade. There, KAS-O and the HyperShift CPO still enforcerestrictedcluster-wide and rely on the syncer'senforcelabels to relax namespaces:podsecurityadmission.go#L100-L108kas/config.go#L188-L192Those have to change first. Otherwise new namespaces on those clusters get
restricted, whatever SCCs their service accounts may use./hold
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Documentation
Clarified how PSA label synchronization varies by feature-gate state, including when it synchronizes enforce, warn, and audit labels, synchronizes only warn and audit labels, or is disabled.
Bug Fixes
Updated the controller’s behavior to match the documented feature-gate modes: it no longer starts when the gate is enabled or unspecified.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->