From c5b9357c2e93e0a2b4fbc9dd5ae1dd6729fa6cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= Date: Sun, 21 Oct 2018 05:40:52 +0200 Subject: [PATCH] [stable/horovod] Major version bump: Fix chart not being upgradable. (#8596) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/helm/charts/issues/7680. Signed-off-by: Cédric de Saint Martin --- stable/horovod/Chart.yaml | 2 +- stable/horovod/README.md | 17 ++++++++++++++++- stable/horovod/templates/statefulset.yaml | 10 +++++++--- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/stable/horovod/Chart.yaml b/stable/horovod/Chart.yaml index 93f11bfa26..77369d4702 100644 --- a/stable/horovod/Chart.yaml +++ b/stable/horovod/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A Helm chart for deploying Horovod name: horovod -version: 0.2.1 +version: 1.0.0 appVersion: 0.12.1 sources: - https://github.com/uber/horovod diff --git a/stable/horovod/README.md b/stable/horovod/README.md index 9aa125bad5..84ae22cbb1 100644 --- a/stable/horovod/README.md +++ b/stable/horovod/README.md @@ -8,7 +8,7 @@ This chart bootstraps Horovod which is a Distributed TensorFlow Framework on a K ## Prerequisites -- Kubernetes cluster v1.8+ +- Kubernetes cluster v1.8+ ## Build Docker Image @@ -122,6 +122,21 @@ $ helm delete mnist 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. + +### 1.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. + +In order to upgrade, delete the Horovod StatefulSet before upgrading, supposing your Release is named `my-release`: + +```bash +$ kubectl delete statefulsets.apps --cascade=false my-release +``` + ## Configuration The following table lists the configurable parameters of the Horovod diff --git a/stable/horovod/templates/statefulset.yaml b/stable/horovod/templates/statefulset.yaml index 31102f5a0d..1d3f7577ba 100644 --- a/stable/horovod/templates/statefulset.yaml +++ b/stable/horovod/templates/statefulset.yaml @@ -12,7 +12,6 @@ spec: selector: matchLabels: app: {{ template "horovod.name" . }} - chart: {{ template "horovod.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} role: worker @@ -28,6 +27,11 @@ spec: heritage: {{ .Release.Service }} role: worker spec: + selector: + matchLabels: + app: {{ template "horovod.name" . }} + release: {{ .Release.Name }} + role: worker {{- if .Values.useHostNetwork }} hostNetwork: {{ .Values.useHostNetwork }} dnsPolicy: ClusterFirstWithHostNet @@ -74,7 +78,7 @@ spec: - name: USESECRETS value: "{{ .Values.ssh.useSecrets }}" {{- end }} - {{- if .Values.master.env }} + {{- if .Values.master.env }} {{- range $key, $value := .Values.master.env }} - name: "{{ $key }}" value: "{{ $value }}" @@ -97,7 +101,7 @@ spec: {{- if .Values.volumeMounts }} {{ toYaml .Values.volumeMounts | indent 8 }} {{- end }} - command: + command: - /horovod/generated/run.sh {{- if .Values.ssh.useSecrets }} readinessProbe: