promote init containers to podspec (#1739)

This commit is contained in:
Dhilip
2017-08-15 16:28:30 -07:00
committed by Vic Iglesias
parent fecc804fc2
commit 229ba80b28
2 changed files with 12 additions and 19 deletions
+1 -1
View File
@@ -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
+11 -18
View File
@@ -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 }}"