redhat-cop / namespace-configuration-operator

The namespace-configuration-operator helps keeping configurations related to Users, Groups and Namespaces aligned with one of more policies specified as a CRs
Apache License 2.0
204 stars 55 forks source link

Upgrade to 1.2.3 Fails - field is immutable #128

Closed kylegalea closed 2 years ago

kylegalea commented 2 years ago

@raffaelespazzoli

Upgrade to 1.2.3 namespace config operator is failing on trying to change an immutable field in the deployment of the operator.

install strategy failed: Deployment.apps "namespace-configuration-operator-controller-manager" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"control-plane":"namespace-configuration-operator"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable

We do not wish to manually delete the 1.22 deployment as this might impact the templated objects we have using this operator.

Thanks

kylegalea commented 2 years ago

Deleting the deployment works - templated objects were not removed

mto-beep commented 2 years ago

grafik

Hey i have the same problem, so you deleted the deployment of 1.2.2? and have you enabled "Delete dependent objects of this resource" ?

kylegalea commented 2 years ago

yes - i left delete dependent objects ticked - didn't affect the templated objects whatsoever. After that you should see the deployment recreate.

mto-beep commented 2 years ago

Thanks, that worked.