Operator throws error during chart version upgrade
Summary
The error was seen here: https://gitlab.com/charts/gitlab/-/jobs/140808104
and is as follows:
Error: UPGRADE FAILED: Deployment.apps "production-operator" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"operator", "chart":"operator-1.4.1", "component":"operator", "heritage":"Tiller", "release":"production"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
This is because we used our standard labels, which include version information, in the matchLabels field for the operator deployment (which is immutable).
We need to only set immutable labels there, similar to what we do for our other deployments.
Edited by DJ Mountney