From 229ba80b28bcac05745bca94af008c537a08bc7b Mon Sep 17 00:00:00 2001 From: Dhilip Date: Wed, 16 Aug 2017 04:58:30 +0530 Subject: [PATCH] promote init containers to podspec (#1739) --- stable/mysql/README.md | 2 +- stable/mysql/templates/deployment.yaml | 29 ++++++++++---------------- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/stable/mysql/README.md b/stable/mysql/README.md index 7d7b4528c9..6dec425111 100644 --- a/stable/mysql/README.md +++ b/stable/mysql/README.md @@ -8,7 +8,7 @@ This chart bootstraps a single node MySQL deployment on a [Kubernetes](http://ku ## Prerequisites -- Kubernetes 1.4+ with Beta APIs enabled +- Kubernetes 1.6+ with Beta APIs enabled - PV provisioner support in the underlying infrastructure ## Installing the Chart diff --git a/stable/mysql/templates/deployment.yaml b/stable/mysql/templates/deployment.yaml index 36d4f9773c..86dafbdbe5 100644 --- a/stable/mysql/templates/deployment.yaml +++ b/stable/mysql/templates/deployment.yaml @@ -12,25 +12,18 @@ spec: metadata: labels: app: {{ template "fullname" . }} - annotations: - pod.beta.kubernetes.io/init-containers: '[ - { - "name": "remove-lost-found", - "image": "busybox:1.25.0", - "command": ["rm", "-fr", "/var/lib/mysql/lost+found"], - "volumeMounts": [ - { - "name": "data", - {{- if .Values.persistence.subPath }} - "subPath": "{{ .Values.persistence.subPath }}", - {{- end }} - "mountPath": "/var/lib/mysql" - } - ], - "imagePullPolicy": {{ .Values.imagePullPolicy | quote }} - } - ]' spec: + initContainers: + - name: "remove-lost-found" + image: "busybox:1.25.0" + imagePullPolicy: {{ .Values.imagePullPolicy | quote }} + command: ["rm", "-fr", "/var/lib/mysql/lost+found"] + volumeMounts: + - name: data + mountPath: /var/lib/mysql + {{- if .Values.persistence.subPath }} + subPath: {{ .Values.persistence.subPath }} + {{- end }} containers: - name: {{ template "fullname" . }} image: "{{ .Values.image }}:{{ .Values.imageTag }}"