You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling reconciler.SetupWithManager with .For() multiple times loses previous apiTypes with controller-runtime < 0.7.0 or raises error with newer controller-runtime
#13
Open
yaksharma opened this issue
Jul 30, 2021
· 0 comments
Kratos controller-runtime consumer should watch both scalingv1alpha1.Kratos and corev1.ConfigMap resources for kratos spec.
Actual Behaviour
Kratos controller-runtime consumer calls [.For(scalingv1alpha1.Kratos).For(corev1.ConfigMap](https://github.com/adobe/kratos/blob/master/controllers/kratos_controller.go#L89-L90)), then scalingv1alpha1.Kratos is silently lost in favour of ConfigMap. with controller-runtime < 0.7.0 or raises an error for newer versions.
ERROR setup unable to setup controller with manager {"controller": "Kratos", "error": "For(...) should only be called once, could not assign multiple objects for reconciliation"}
The text was updated successfully, but these errors were encountered:
Expected Behaviour
Kratos controller-runtime consumer should watch both
scalingv1alpha1.Kratos
andcorev1.ConfigMap
resources for kratos spec.Actual Behaviour
Kratos controller-runtime consumer calls
[.For(scalingv1alpha1.Kratos).For(corev1.ConfigMap](https://github.com/adobe/kratos/blob/master/controllers/kratos_controller.go#L89-L90))
, thenscalingv1alpha1.Kratos
is silently lost in favour ofConfigMap
. withcontroller-runtime < 0.7.0
or raises an error for newer versions.Reproduce Scenario (including but not limited to)
For
to one apiType.Steps to Reproduce
Platform and Version
Sample Code that illustrates the problem
https://github.com/adobe/kratos/blob/master/controllers/kratos_controller.go#L89-L90
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: