Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/graylog] Fix #20306, add helm2Compatibility flag to `values…
Browse files Browse the repository at this point in the history
….yaml` that preserves specific labels installed by helm2 for backward compatibility. (#20464)

Signed-off-by: juliohm1978 <jhm@juliohm.com.br>
  • Loading branch information
Julio H Morimoto authored Jan 31, 2020
1 parent 665fbdc commit f9eedf2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/graylog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: graylog
home: https://www.graylog.org
version: 1.5.2
version: 1.5.3
appVersion: 3.1
description: Graylog is the centralized log management solution built to open standards for capturing, storing, and enabling real-time analysis of terabytes of machine data.
keywords:
Expand Down
8 changes: 8 additions & 0 deletions stable/graylog/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ spec:
matchLabels:
app.kubernetes.io/name: {{ template "graylog.name" . }}
app.kubernetes.io/instance: "{{ .Release.Name }}"
{{- if .Values.helm2Compatibility }}
app.kubernetes.io/managed-by: "Tiller"
{{- else }}
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
{{- end }}
updateStrategy:
type: {{ .Values.graylog.updateStrategy }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ template "graylog.name" . }}
helm.sh/chart: {{ template "graylog.chart" . }}
{{- if .Values.helm2Compatibility }}
app.kubernetes.io/managed-by: "Tiller"
{{- else }}
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
{{- end }}
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
annotations:
Expand Down
10 changes: 10 additions & 0 deletions stable/graylog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ tags:
# If true, this chart will install MongoDB replicaset from requirement dependencies
install-mongodb: true

## Enable only if your current release was migrated from helm2 (using 2to3 plugin).
##
## Because Kubernetes considers some StatefulSets fields/labels immutable,
## this flag preserves the values rendered by helm2. This allows helm3
## to upgrade the current release without a complete purge/reinstall.
##
## Further details: https://github.com/helm/charts/issues/20306
##
# helm2Compatibility: true

graylog:
## Graylog image version
## Ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down

0 comments on commit f9eedf2

Please sign in to comment.