Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
[metricbeat] only use .Chart.Version in chart label
Browse files Browse the repository at this point in the history
This fix metricbeat chart upgrades when .Chart.Version change.

UPGRADE FAILED
Error: Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.7.0", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
Error: UPGRADE FAILED: Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.7.0", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable

See helm/charts#7680 for more details
  • Loading branch information
jmlrt committed May 15, 2020
1 parent e0cf8c1 commit d12e71a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metricbeat/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
selector:
matchLabels:
app: '{{ template "metricbeat.fullname" . }}-metrics'
chart: '{{ .Chart.Name }}-{{ .Chart.Version }}'
chart: '{{ .Chart.Name }}'
heritage: '{{ .Release.Service }}'
release: '{{ .Release.Name }}'
template:
Expand Down Expand Up @@ -119,4 +119,4 @@ spec:
{{- end }}
{{- if .Values.extraContainers }}
{{ tpl .Values.extraContainers . | indent 6 }}
{{- end }}
{{- end }}

0 comments on commit d12e71a

Please sign in to comment.