@@ -55,38 +55,52 @@ func SetupClusterGatewayInstallerWithManager(mgr ctrl.Manager, caPair *crypto.CA
55
55
mapper : mgr .GetRESTMapper (),
56
56
}
57
57
return ctrl .NewControllerManagedBy (mgr ).
58
+ // Watches ClusterManagementAddOn singleton
58
59
For (& addonv1alpha1.ClusterManagementAddOn {}).
60
+ // Watches ClusterGatewayConfiguration singleton
59
61
Watches (
60
62
& source.Kind {
61
63
Type : & proxyv1alpha1.ClusterGatewayConfiguration {},
62
64
},
63
65
& event.ClusterGatewayConfigurationHandler {
64
66
Client : mgr .GetClient (),
65
67
}).
68
+ // Watches ManagedClusterAddon.
69
+ Watches (
70
+ & source.Kind {
71
+ Type : & addonv1alpha1.ManagedClusterAddOn {},
72
+ },
73
+ & handler.EnqueueRequestForOwner {
74
+ OwnerType : & addonv1alpha1.ClusterManagementAddOn {},
75
+ }).
76
+ // Cluster-Gateway mTLS certificate should be actively reconciled
66
77
Watches (
67
78
& source.Kind {
68
79
Type : & corev1.Secret {},
69
80
},
70
81
& handler.EnqueueRequestForOwner {
71
82
OwnerType : & addonv1alpha1.ClusterManagementAddOn {},
72
83
}).
84
+ // Secrets rotated by ManagedServiceAccount should be actively reconciled
73
85
Watches (
74
86
& source.Kind {
75
87
Type : & corev1.Secret {},
76
88
},
77
89
& event.SecretHandler {}).
90
+ // Cluster-gateway apiserver instances should be actively reconciled
78
91
Watches (
79
92
& source.Kind {
80
93
Type : & appsv1.Deployment {},
81
94
},
82
95
& handler.EnqueueRequestForOwner {
83
96
OwnerType : & addonv1alpha1.ClusterManagementAddOn {},
84
97
}).
98
+ // APIService should be actively reconciled
85
99
Watches (
86
100
& source.Kind {
87
101
Type : & apiregistrationv1.APIService {},
88
102
},
89
- & event.APIServiceHandler {}).
103
+ & event.APIServiceHandler {WatchingName : common . ClusterGatewayAPIServiceName }).
90
104
Complete (installer )
91
105
}
92
106
0 commit comments