summaryrefslogtreecommitdiffstats
path: root/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml')
-rw-r--r--kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml17
1 files changed, 11 insertions, 6 deletions
diff --git a/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml b/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml
index 1df20c291d..f7fa15ca89 100644
--- a/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml
+++ b/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml
@@ -30,6 +30,13 @@ spec:
app: {{ include "common.name" . }}
release: {{ .Release.Name }}
spec:
+ initContainers:
+ - name: {{ include "common.name" . }}-chown
+ image: "busybox"
+ command: ["sh", "-c", "chown -R {{ .Values.config.ansibleUid }}:{{ .Values.config.ansibleGid}} {{ .Values.persistence.playbookPath }}"]
+ volumeMounts:
+ - mountPath: {{ .Values.persistence.playbookPath }}
+ name: {{ include "common.fullname" . }}-playbook
containers:
- name: {{ include "common.name" . }}
command: ["/bin/bash"]
@@ -60,7 +67,7 @@ spec:
name: config
subPath: RestServer_config
- mountPath: {{ .Values.persistence.playbookPath }}
- name: {{ include "common.fullname" . }}-data
+ name: {{ include "common.fullname" . }}-playbook
resources:
{{ include "common.resources" . | indent 12 }}
{{- if .Values.nodeSelector }}
@@ -80,20 +87,18 @@ spec:
name: {{ include "common.fullname" . }}
defaultMode: 0644
{{ if not .Values.persistence.enabled }}
- - name: {{ include "common.fullname" . }}-data
+ - name: {{ include "common.fullname" . }}-playbook
emptyDir: {}
{{ else }}
volumeClaimTemplates:
- metadata:
- name: {{ include "common.fullname" . }}-data
+ name: {{ include "common.fullname" . }}-playbook
labels:
name: {{ include "common.fullname" . }}
spec:
accessModes: [ {{ .Values.persistence.accessMode }} ]
- storageClassName: {{ include "common.fullname" . }}-data
+ storageClassName: {{ include "common.fullname" . }}-playbook
resources:
requests:
storage: {{ .Values.persistence.size }}
{{ end }}
- imagePullSecrets:
- - name: "{{ include "common.namespace" . }}-docker-registry-key"