diff --git a/upstreamed/rabbitmq/Chart.yaml b/upstreamed/rabbitmq/Chart.yaml index 93cf8e34f..2b9f7907f 100644 --- a/upstreamed/rabbitmq/Chart.yaml +++ b/upstreamed/rabbitmq/Chart.yaml @@ -1,5 +1,5 @@ name: rabbitmq -version: 3.0.1 +version: 3.1.0 appVersion: 3.7.8 description: Open source message broker software that implements the Advanced Message Queuing Protocol (AMQP) keywords: diff --git a/upstreamed/rabbitmq/templates/statefulset.yaml b/upstreamed/rabbitmq/templates/statefulset.yaml index aeb87fed0..7705cc222 100644 --- a/upstreamed/rabbitmq/templates/statefulset.yaml +++ b/upstreamed/rabbitmq/templates/statefulset.yaml @@ -160,7 +160,6 @@ spec: name: data labels: app: {{ template "rabbitmq.name" . }} - chart: {{ template "rabbitmq.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" spec: diff --git a/upstreamed/redis/Chart.yaml b/upstreamed/redis/Chart.yaml index 8a4785d2d..a3f99446c 100644 --- a/upstreamed/redis/Chart.yaml +++ b/upstreamed/redis/Chart.yaml @@ -1,5 +1,5 @@ name: redis -version: 3.10.0 +version: 4.0.1 appVersion: 4.0.11 description: Open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. keywords: diff --git a/upstreamed/redis/README.md b/upstreamed/redis/README.md index a537a1561..5a4befad9 100644 --- a/upstreamed/redis/README.md +++ b/upstreamed/redis/README.md @@ -45,6 +45,31 @@ $ helm delete my-release The command removes all the Kubernetes components associated with the chart and deletes the release. +## Upgrading an existing Release to a new major version + +A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an +incompatible breaking change needing manual actions. + +### 4.0.0 + +This version removes the `chart` label from the `spec.selector.matchLabels` +which is immutable since `StatefulSet apps/v1beta2`. It has been inadvertently +added, causing any subsequent upgrade to fail. See https://github.com/helm/charts/issues/7726. + +It also fixes https://github.com/helm/charts/issues/7726 where a deployment `extensions/v1beta1` can not be upgraded if `spec.selector` is not explicitely set. + +Finally, it fixes https://github.com/helm/charts/issues/7803 by removing mutable labels in `spec.VolumeClaimTemplate.metadata.labels` so that it is upgradable. + +In order to upgrade, delete the Redis StatefulSet before upgrading: +```bash +$ kubectl delete statefulsets.apps --cascade=false my-release-redis-master +``` +And edit the Redis slave (and metrics if enabled) deployment: +```bash +kubectl patch deployments my-release-redis-slave --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' +kubectl patch deployments my-release-redis-metrics --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' +``` + ## Configuration The following table lists the configurable parameters of the Redis chart and their default values. diff --git a/upstreamed/redis/templates/metrics-deployment.yaml b/upstreamed/redis/templates/metrics-deployment.yaml index 5f33b7d6a..f9d425168 100644 --- a/upstreamed/redis/templates/metrics-deployment.yaml +++ b/upstreamed/redis/templates/metrics-deployment.yaml @@ -9,6 +9,11 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" spec: + selector: + matchLabels: + release: "{{ .Release.Name }}" + role: metrics + app: {{ template "redis.name" . }} template: metadata: labels: diff --git a/upstreamed/redis/templates/redis-master-statefulset.yaml b/upstreamed/redis/templates/redis-master-statefulset.yaml index 428f20189..7a77518fb 100644 --- a/upstreamed/redis/templates/redis-master-statefulset.yaml +++ b/upstreamed/redis/templates/redis-master-statefulset.yaml @@ -11,7 +11,6 @@ spec: selector: matchLabels: release: "{{ .Release.Name }}" - chart: {{ template "redis.chart" . }} role: master app: {{ template "redis.name" . }} serviceName: "redis-master" @@ -161,7 +160,6 @@ spec: name: redis-data labels: app: "{{ template "redis.name" . }}" - chart: {{ template "redis.chart" . }} component: "master" release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} diff --git a/upstreamed/redis/templates/redis-master-svc.yaml b/upstreamed/redis/templates/redis-master-svc.yaml index 77c734cea..c41672f76 100644 --- a/upstreamed/redis/templates/redis-master-svc.yaml +++ b/upstreamed/redis/templates/redis-master-svc.yaml @@ -7,9 +7,9 @@ metadata: chart: {{ template "redis.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" +{{- with .Values.master.service.annotations }} annotations: -{{- if .Values.master.service.annotations }} -{{ toYaml .Values.master.service.annotations | indent 4 }} +{{ toYaml . | indent 4 }} {{- end }} spec: type: {{ .Values.master.service.type }} diff --git a/upstreamed/redis/templates/redis-slave-deployment.yaml b/upstreamed/redis/templates/redis-slave-deployment.yaml index 8e3711a3a..d587f55fc 100644 --- a/upstreamed/redis/templates/redis-slave-deployment.yaml +++ b/upstreamed/redis/templates/redis-slave-deployment.yaml @@ -12,6 +12,11 @@ spec: {{- if .Values.cluster.slaveCount }} replicas: {{ .Values.cluster.slaveCount }} {{- end }} + selector: + matchLabels: + release: "{{ .Release.Name }}" + role: slave + app: {{ template "redis.name" . }} template: metadata: labels: