From febf7e2f6dcd889ccbd9a5a08ee4d1fab26c5697 Mon Sep 17 00:00:00 2001 From: "Javier J. Salmeron Garcia" Date: Fri, 21 Sep 2018 16:02:50 +0200 Subject: [PATCH] [bitnami/mean] Fix chart not being upgradable Signed-off-by: Javier J. Salmeron Garcia --- bitnami/mean/Chart.yaml | 2 +- bitnami/mean/README.md | 12 ++++++++++++ bitnami/mean/templates/deployment.yaml | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/bitnami/mean/Chart.yaml b/bitnami/mean/Chart.yaml index 8b1577426..7aae90875 100644 --- a/bitnami/mean/Chart.yaml +++ b/bitnami/mean/Chart.yaml @@ -1,5 +1,5 @@ name: mean -version: 3.0.0 +version: 4.0.0 appVersion: 3.6.4 description: MEAN is a free and open-source JavaScript software stack for building dynamic web sites and web applications. The MEAN stack is MongoDB, Express.js, Angular, and Node.js. Because all components of the MEAN stack support programs written in JavaScript, MEAN applications can be written in one language for both server-side and client-side execution environments. keywords: diff --git a/bitnami/mean/README.md b/bitnami/mean/README.md index 5607e82bf..7c9981669 100644 --- a/bitnami/mean/README.md +++ b/bitnami/mean/README.md @@ -218,3 +218,15 @@ Deploying the helm chart enabling the Azure external database makes the followin - Your application uses DATABASE_HOST, DATABASE_PORT, DATABASE_USER, DATABASE_PASSWORD, and DATABASE_NAME environment variables to connect to the database. You can read more about the kubernetes service catalog at https://github.com/kubernetes-bitnami/service-catalog + +## Upgrading + +### To 4.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 4.0.0. The following example assumes that the release name is mean: + +```console +$ kubectl patch deployment mean --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' +$ kubectl patch deployment mean-mongodb --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' +``` diff --git a/bitnami/mean/templates/deployment.yaml b/bitnami/mean/templates/deployment.yaml index 9eed8be75..9b378c168 100644 --- a/bitnami/mean/templates/deployment.yaml +++ b/bitnami/mean/templates/deployment.yaml @@ -8,6 +8,10 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" spec: + selector: + matchLabels: + app: {{ template "mean.name" . }} + release: "{{ .Release.Name }}" replicas: {{ .Values.replicas }} template: metadata: