Skip to content

Commit 11c5185

Browse files
committed
remove deprecated work execution clusterrolebinding
Signed-off-by: Zhiwei Yin <[email protected]>
1 parent 4eda44f commit 11c5185

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

manifests/klusterlet/managed/klusterlet-work-clusterrolebinding-execution.yaml

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

pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_cleanup_controller_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestSyncDelete(t *testing.T) {
5353
}
5454

5555
// 11 managed static manifests + 12 management static manifests + 1 hub kubeconfig + 2 namespaces + 2 deployments
56-
if len(deleteActions) != 29 {
56+
if len(deleteActions) != 28 {
5757
t.Errorf("Expected 28 delete actions, but got %d", len(deleteActions))
5858
}
5959

@@ -127,7 +127,7 @@ func TestSyncDeleteHosted(t *testing.T) {
127127
}
128128

129129
// 12 static manifests + 2 namespaces
130-
if len(deleteActionsManaged) != 15 {
130+
if len(deleteActionsManaged) != 14 {
131131
t.Errorf("Expected 14 delete actions, but got %d", len(deleteActionsManaged))
132132
}
133133

pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_managed_reconcile.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ var (
4242
"klusterlet/managed/klusterlet-work-clusterrolebinding-aggregate.yaml",
4343
"klusterlet/managed/klusterlet-work-clusterrolebinding-execution-admin.yaml",
4444
}
45-
46-
cleanedManagedStaticResourceFiles = append(managedStaticResourceFiles,
47-
"klusterlet/managed/klusterlet-work-clusterrolebinding-execution.yaml")
4845
)
4946

5047
// managedReconcile apply resources to managed clusters
@@ -180,7 +177,7 @@ func (r *managedReconcile) clean(ctx context.Context, klusterlet *operatorapiv1.
180177
}
181178

182179
if err := removeStaticResources(ctx, r.managedClusterClients.kubeClient, r.managedClusterClients.apiExtensionClient,
183-
cleanedManagedStaticResourceFiles, config); err != nil {
180+
managedStaticResourceFiles, config); err != nil {
184181
return klusterlet, reconcileStop, err
185182
}
186183

0 commit comments

Comments
 (0)