Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions controllers/heatapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (r *HeatAPIReconciler) SetupWithManager(mgr ctrl.Manager) error {
return err
}

configMapFn := func(_ context.Context, o client.Object) []reconcile.Request {
secretFn := func(_ context.Context, o client.Object) []reconcile.Request {
result := []reconcile.Request{}

apis := &heatv1beta1.HeatAPIList{}
Expand All @@ -278,7 +278,7 @@ func (r *HeatAPIReconciler) SetupWithManager(mgr ctrl.Manager) error {
Namespace: o.GetNamespace(),
Name: cr.Name,
}
r.Log.Info(fmt.Sprintf("ConfigMap object %s and CR %s marked with label: %s", o.GetName(), cr.Name, l))
r.Log.Info(fmt.Sprintf("secret object %s and CR %s marked with label: %s", o.GetName(), cr.Name, l))
result = append(result, reconcile.Request{NamespacedName: name})
}
}
Expand All @@ -296,8 +296,8 @@ func (r *HeatAPIReconciler) SetupWithManager(mgr ctrl.Manager) error {
Owns(&appsv1.Deployment{}).
Owns(&corev1.Service{}).
// watch the config CMs we don't own
Watches(&corev1.ConfigMap{},
handler.EnqueueRequestsFromMapFunc(configMapFn)).
Watches(&corev1.Secret{},
handler.EnqueueRequestsFromMapFunc(secretFn)).
Watches(
&corev1.Secret{},
handler.EnqueueRequestsFromMapFunc(r.findObjectsForSrc),
Expand Down
9 changes: 4 additions & 5 deletions controllers/heatcfnapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (r *HeatCfnAPIReconciler) SetupWithManager(mgr ctrl.Manager) error {
return err
}

configMapFn := func(_ context.Context, o client.Object) []reconcile.Request {
secretFn := func(_ context.Context, o client.Object) []reconcile.Request {
result := []reconcile.Request{}

apis := &heatv1beta1.HeatCfnAPIList{}
Expand All @@ -280,7 +280,7 @@ func (r *HeatCfnAPIReconciler) SetupWithManager(mgr ctrl.Manager) error {
Namespace: o.GetNamespace(),
Name: cr.Name,
}
r.Log.Info(fmt.Sprintf("ConfigMap object %s and CR %s marked with label: %s", o.GetName(), cr.Name, l))
r.Log.Info(fmt.Sprintf("secret object %s and CR %s marked with label: %s", o.GetName(), cr.Name, l))
result = append(result, reconcile.Request{NamespacedName: name})
}
}
Expand All @@ -297,9 +297,8 @@ func (r *HeatCfnAPIReconciler) SetupWithManager(mgr ctrl.Manager) error {
Owns(&keystonev1.KeystoneEndpoint{}).
Owns(&appsv1.Deployment{}).
Owns(&corev1.Service{}).
// watch the config CMs we don't own
Watches(&corev1.ConfigMap{},
handler.EnqueueRequestsFromMapFunc(configMapFn)).
Watches(&corev1.Secret{},
handler.EnqueueRequestsFromMapFunc(secretFn)).
Watches(
&corev1.Secret{},
handler.EnqueueRequestsFromMapFunc(r.findObjectsForSrc),
Expand Down
8 changes: 4 additions & 4 deletions controllers/heatengine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (r *HeatEngineReconciler) SetupWithManager(mgr ctrl.Manager) error {
return err
}

configMapFn := func(_ context.Context, o client.Object) []reconcile.Request {
secretFn := func(_ context.Context, o client.Object) []reconcile.Request {
result := []reconcile.Request{}

engines := &heatv1beta1.HeatEngineList{}
Expand All @@ -231,7 +231,7 @@ func (r *HeatEngineReconciler) SetupWithManager(mgr ctrl.Manager) error {
Namespace: o.GetNamespace(),
Name: cr.Name,
}
r.Log.Info(fmt.Sprintf("ConfigMap object %s and CR %s marked with label: %s", o.GetName(), cr.Name, l))
r.Log.Info(fmt.Sprintf("secret object %s and CR %s marked with label: %s", o.GetName(), cr.Name, l))
result = append(result, reconcile.Request{NamespacedName: name})
}
}
Expand All @@ -244,8 +244,8 @@ func (r *HeatEngineReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&heatv1beta1.HeatEngine{}).
Owns(&appsv1.Deployment{}).
Watches(&corev1.ConfigMap{},
handler.EnqueueRequestsFromMapFunc(configMapFn)).
Watches(&corev1.Secret{},
handler.EnqueueRequestsFromMapFunc(secretFn)).
Watches(
&corev1.Secret{},
handler.EnqueueRequestsFromMapFunc(r.findObjectsForSrc),
Expand Down