Skip to content

Commit 299a4f6

Browse files
Buddhi KothalawalaBuddhi Kothalawala
authored andcommitted
Add comments to watch functions
1 parent d1182b8 commit 299a4f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/controller/siddhiprocess/siddhiprocess_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
9797
return err
9898
}
9999

100+
// Watch for changes to secondary resource Deployments and requeue the owner SiddhiProcess
100101
err = c.Watch(&source.Kind{Type: &appsv1.Deployment{}}, &handler.EnqueueRequestForOwner{
101102
IsController: true,
102103
OwnerType: &siddhiv1alpha2.SiddhiProcess{},
@@ -105,6 +106,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
105106
return err
106107
}
107108

109+
// Watch for changes to secondary resource Services and requeue the owner SiddhiProcess
108110
err = c.Watch(&source.Kind{Type: &corev1.Service{}}, &handler.EnqueueRequestForOwner{
109111
IsController: true,
110112
OwnerType: &siddhiv1alpha2.SiddhiProcess{},
@@ -113,6 +115,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
113115
return err
114116
}
115117

118+
// Watch for changes to secondary resource PersistentVolumeClaims and requeue the owner SiddhiProcess
116119
err = c.Watch(&source.Kind{Type: &corev1.PersistentVolumeClaim{}}, &handler.EnqueueRequestForOwner{
117120
IsController: true,
118121
OwnerType: &siddhiv1alpha2.SiddhiProcess{},
@@ -121,6 +124,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
121124
return err
122125
}
123126

127+
// Watch for changes to secondary resource NatsClusters and requeue the owner SiddhiProcess
124128
err = c.Watch(&source.Kind{Type: &natsv1alpha2.NatsCluster{}}, &handler.EnqueueRequestForOwner{
125129
IsController: true,
126130
OwnerType: &siddhiv1alpha2.SiddhiProcess{},
@@ -129,6 +133,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
129133
return err
130134
}
131135

136+
// Watch for changes to secondary resource NatsStreamingClusters and requeue the owner SiddhiProcess
132137
err = c.Watch(&source.Kind{Type: &streamingv1alpha1.NatsStreamingCluster{}}, &handler.EnqueueRequestForOwner{
133138
IsController: true,
134139
OwnerType: &siddhiv1alpha2.SiddhiProcess{},
@@ -137,6 +142,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
137142
return err
138143
}
139144

145+
// Watch for changes to secondary resource Pods and requeue the owner SiddhiProcess
140146
err = c.Watch(&source.Kind{Type: &corev1.Pod{}}, &handler.EnqueueRequestForOwner{
141147
IsController: true,
142148
OwnerType: &siddhiv1alpha2.SiddhiProcess{},

0 commit comments

Comments
 (0)