Actions before raising this issue
Steps to Reproduce
- Deploy the CVAT helm chart
- Add a new label to the helm values file (e.g. under
cvat.backend.labels)
- Try to deploy the updated helm chart
Observe errors trying to patch deployment (or statefulset) resources:
cannot patch "cvat-cvat-backend-server" with kind Deployment: Deployment.apps "cvat-cvat-backend-server" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"cvat-app", "app.kubernetes.io/instance":"cvat-cvat", "app.kubernetes.io/managed-by":"Helm", "app.kubernetes.io/name":"cvat", "app.kubernetes.io/version":"latest", "my-new-label":"value", "component":"server", "helm.sh/chart":"cvat", "tier":"backend"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
Expected Behavior
The helm chart should deploy successfully, and deployments and statefulsets should be patched with the new labels.
Possible Solution
Use the selectorLabels macro for matchLabels instead of all applied podLabels
Context
No response
Environment
- CVAT 2.28.0 (but present in main)
- Kubernetes + Helm deployment
Actions before raising this issue
Steps to Reproduce
cvat.backend.labels)Observe errors trying to patch deployment (or statefulset) resources:
Expected Behavior
The helm chart should deploy successfully, and deployments and statefulsets should be patched with the new labels.
Possible Solution
Use the
selectorLabelsmacro formatchLabelsinstead of all appliedpodLabelsContext
No response
Environment