mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
promote init containers to podspec (#1739)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user