Skip to content

Commit 10e7337

Browse files
pedjakclaude
andcommitted
refactor: inline rest config mapper, remove obsolete docs and dead code
Replace ClusterAdminRestConfigMapper with an anonymous closure in main.go, eliminating the now-unnecessary action/restconfig.go file. Delete obsolete synthetic-permissions howto documentation. OPRUN-4630, OPRUN-4631, OPRUN-4632 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 61b62e7 commit 10e7337

4 files changed

Lines changed: 5 additions & 151 deletions

File tree

.claude/TODO-OCPSTRAT-3040.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Anyone: Stream 6 (docs) ← after 4
6060
- [X] Remove `SyntheticPermissions` feature gate from `features.go`**OPRUN-4632**
6161
- [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`
63-
- [ ] Update all unit + e2e tests — **OPRUN-4630, OPRUN-4631, OPRUN-4632**
63+
- [X] Update all unit + e2e tests — **OPRUN-4630, OPRUN-4631, OPRUN-4632**
6464

6565
> **Ticket close gates:**
6666
> - OPRUN-4630 closable when all streams 1, 2, 4 items marked with OPRUN-4630 are done

cmd/operator-controller/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import (
4141
"k8s.io/client-go/discovery/cached/memory"
4242
corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
4343
_ "k8s.io/client-go/plugin/pkg/client/auth"
44+
"k8s.io/client-go/rest"
4445
"k8s.io/klog/v2"
4546
"k8s.io/utils/ptr"
4647
"pkg.package-operator.run/boxcutter/managedcache"
@@ -687,7 +688,9 @@ func (c *helmReconcilerConfigurator) Configure(ceReconciler *controllers.Cluster
687688
if err != nil {
688689
return fmt.Errorf("unable to create core client: %w", err)
689690
}
690-
clientRestConfigMapper := action.ClusterAdminRestConfigMapper(c.mgr.GetConfig())
691+
clientRestConfigMapper := func(_ context.Context, _ client.Object, _ *rest.Config) (*rest.Config, error) {
692+
return rest.CopyConfig(c.mgr.GetConfig()), nil
693+
}
691694

692695
cfgGetter, err := helmclient.NewActionConfigGetter(c.mgr.GetConfig(), c.mgr.GetRESTMapper(),
693696
helmclient.StorageDriverMapper(action.ChunkedStorageDriverMapper(coreClient, c.mgr.GetAPIReader(), cfg.systemNamespace)),

docs/draft/howto/use-synthetic-permissions.md

Lines changed: 0 additions & 133 deletions
This file was deleted.

internal/operator-controller/action/restconfig.go

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)