Skip to content

Commit 1f239ff

Browse files
committed
prevent automatic controller naming logic from breaking the operator
On-behalf-of: @SAP [email protected]
1 parent 288be85 commit 1f239ff

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

internal/controller/cacheserver/controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ func (r *CacheServerReconciler) Reconcile(ctx context.Context, req ctrl.Request)
5757
// SetupWithManager sets up the controller with the Manager.
5858
func (r *CacheServerReconciler) SetupWithManager(mgr ctrl.Manager) error {
5959
return ctrl.NewControllerManagedBy(mgr).
60+
Named("cacheserver").
6061
For(&operatorv1alpha1.CacheServer{}).
6162
Complete(r)
6263
}

internal/controller/frontproxy/controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ func (r *FrontProxyReconciler) SetupWithManager(mgr ctrl.Manager) error {
7171
})
7272

7373
return ctrl.NewControllerManagedBy(mgr).
74+
Named("frontproxy").
7475
For(&operatorv1alpha1.FrontProxy{}).
7576
Owns(&appsv1.Deployment{}).
7677
Owns(&corev1.ConfigMap{}).

internal/controller/kubeconfig-rbac/controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type KubeconfigRBACReconciler struct {
4848
func (r *KubeconfigRBACReconciler) SetupWithManager(mgr ctrl.Manager) error {
4949
return ctrl.NewControllerManagedBy(mgr).
5050
For(&operatorv1alpha1.Kubeconfig{}).
51+
Named("kubeconfig-rbac").
5152
Complete(r)
5253
}
5354

internal/controller/kubeconfig/controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ type KubeconfigReconciler struct {
4949
// SetupWithManager sets up the controller with the Manager.
5050
func (r *KubeconfigReconciler) SetupWithManager(mgr ctrl.Manager) error {
5151
return ctrl.NewControllerManagedBy(mgr).
52+
Named("kubeconfig").
5253
For(&operatorv1alpha1.Kubeconfig{}).
5354
Owns(&corev1.Secret{}).
5455
Owns(&certmanagerv1.Certificate{}).

internal/controller/rootshard/controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ func (r *RootShardReconciler) SetupWithManager(mgr ctrl.Manager) error {
7171
})
7272

7373
return ctrl.NewControllerManagedBy(mgr).
74+
Named("rootshard").
7475
For(&operatorv1alpha1.RootShard{}).
7576
Owns(&appsv1.Deployment{}).
7677
Owns(&corev1.ConfigMap{}).

internal/controller/shard/controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func (r *ShardReconciler) SetupWithManager(mgr ctrl.Manager) error {
7373
})
7474

7575
return ctrl.NewControllerManagedBy(mgr).
76+
Named("shard").
7677
For(&operatorv1alpha1.Shard{}).
7778
Owns(&appsv1.Deployment{}).
7879
Owns(&corev1.Secret{}).

0 commit comments

Comments
 (0)