Skip to content

Commit e1b7d2f

Browse files
pedjakclaude
andcommitted
refactor: remove PreflightPermissions feature gate and stale pre-auth comments
The PreflightPermissions feature gate is now completely orphaned after the authorization package removal in the previous commit. Remove the gate constant and spec definition, and clean up stale pre-auth comments in the Boxcutter applier. RBAC watches in main.go are retained as they serve Boxcutter's phase ordering for bundle RBAC resources. OPRUN-4631 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 58ba6b5 commit e1b7d2f

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

.claude/TODO-OCPSTRAT-3040.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ Anyone: Stream 6 (docs) ← after 4
5454
- [X] Remove `ServiceAccountValidator` reconciliation step — **OPRUN-4630** `7f5a6843`
5555
- [X] Remove `getUserInfo()` from Helm applier — **OPRUN-4630** `7f5a6843`
5656
- [X] Remove `getUserInfo()` from Boxcutter applier — **OPRUN-4630** `7f5a6843`
57-
- [ ] Remove pre-auth checks from Helm applier — **OPRUN-4631**
58-
- [ ] Remove pre-auth checks from Boxcutter applier — **OPRUN-4631**
59-
- [ ] Remove `PreflightPermissions` feature gate from `features.go`**OPRUN-4631**
57+
- [X] Remove pre-auth checks from Helm applier — **OPRUN-4631** N/A (PreAuthorizer removed in `9791b717`)
58+
- [X] Remove pre-auth checks from Boxcutter applier — **OPRUN-4631** N/A (PreAuthorizer removed in `9791b717`)
59+
- [X] Remove `PreflightPermissions` feature gate from `features.go`**OPRUN-4631**
6060
- [ ] Remove `SyntheticPermissions` feature gate from `features.go`**OPRUN-4632**
61-
- [ ] Clean up RBAC watches if only needed for pre-auth — **OPRUN-4631**
61+
- [X] Clean up RBAC watches if only needed for pre-auth — **OPRUN-4631** N/A (RBAC watches serve Boxcutter phase ordering)
6262
- [X] Rewire `main.go`: remove all SA/synthetic/preflight wiring, always use controller's own SA — **OPRUN-4630** `7f5a6843`
6363
- [ ] Update all unit + e2e tests — **OPRUN-4630, OPRUN-4631, OPRUN-4632**
6464

internal/operator-controller/applier/boxcutter.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,7 @@ func (bc *Boxcutter) Apply(ctx context.Context, contentFS fs.FS, ext *ocv1.Clust
519519
}
520520
replaceInlineWithRefs(desiredRevision, packResult)
521521

522-
// SSA patch (refs-vs-refs). Skip pre-auth — just checking for changes.
523-
// createExternalizedRevision runs its own pre-auth if upgrade is needed.
522+
// SSA patch (refs-vs-refs) — just checking for changes.
524523
err = bc.Client.Apply(ctx, desiredRevision, client.FieldOwner(bc.FieldOwner), client.ForceOwnership)
525524

526525
// Restore inline objects for preflights + createExternalizedRevision
@@ -611,7 +610,7 @@ func (bc *Boxcutter) createExternalizedRevision(ctx context.Context, ext *ocv1.C
611610
}
612611
}
613612

614-
// Step 2: Create COS with refs via SSA (pre-auth already ran above)
613+
// Step 2: Create COS with refs via SSA
615614
if err := bc.Client.Apply(ctx, desiredRevision, client.FieldOwner(bc.FieldOwner), client.ForceOwnership); err != nil {
616615
return fmt.Errorf("creating new Revision: %w", err)
617616
}

internal/operator-controller/features/features.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
const (
1212
// Add new feature gates constants (strings)
1313
// Ex: SomeFeature featuregate.Feature = "SomeFeature"
14-
PreflightPermissions featuregate.Feature = "PreflightPermissions"
1514
SingleOwnNamespaceInstallSupport featuregate.Feature = "SingleOwnNamespaceInstallSupport"
1615
SyntheticPermissions featuregate.Feature = "SyntheticPermissions"
1716
WebhookProviderCertManager featuregate.Feature = "WebhookProviderCertManager"
@@ -25,12 +24,6 @@ const (
2524
var operatorControllerFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
2625
// Add new feature gate definitions
2726
// Ex: SomeFeature: {...}
28-
PreflightPermissions: {
29-
Default: false,
30-
PreRelease: featuregate.Alpha,
31-
LockToDefault: false,
32-
},
33-
3427
// SingleOwnNamespaceInstallSupport enables support for installing
3528
// registry+v1 cluster extensions with single or own namespaces modes
3629
// i.e. with a single watch namespace.

0 commit comments

Comments
 (0)