Skip to content

Commit 5c39352

Browse files
jlawrencecfmgoruha
authored andcommitted
Fix init-container (#198)
* Fix init-container Init container annotations seem to no longer work and cause deployment of bastion via helm to fail. * Update Chart.yaml Bump version
1 parent d811a64 commit 5c39352

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

incubator/bastion/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v1
22
description: A Helm chart that implements a secure bastion
33
name: bastion
4-
version: 0.1.1
4+
version: 0.1.2

incubator/bastion/templates/deployment.yaml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@ spec:
1010
metadata:
1111
labels:
1212
app: {{ template "fullname" . }}
13-
annotations:
14-
pod.beta.kubernetes.io/init-containers: '[{
15-
"name": "init",
16-
"image": "{{ .Values.image.repository }}:{{ .Values.image.tag }}",
17-
"imagePullPolicy": {{ .Values.image.pullPolicy | quote }},
18-
"command": ["/bin/sh", "-c", "(cp -a /etc/ /mnt/etc/) && (mkdir -p /mnt/home /mnt/root /mnt/var/log)"],
19-
"volumeMounts": [{
20-
"mountPath": "/mnt",
21-
"name": "{{ template "fullname" . }}"
22-
}]
23-
}]'
2413
spec:
14+
initContainers:
15+
- name: init
16+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
17+
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
18+
command: ["/bin/sh", "-c", "(cp -a /etc/ /mnt/etc/) && (mkdir -p /mnt/home /mnt/root /mnt/var/log)"]
19+
volumeMounts:
20+
- mountPath: "/mnt"
21+
name: "{{ template "fullname" . }}"
2522
containers:
2623
- name: {{ .Chart.Name }}
2724
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

0 commit comments

Comments
 (0)