Elasticsearch Snapshot: Fix permisions for PVC

This PS fixes the permisions for the PVC backing the
Elasticsearch Snapshot

Change-Id: I7b9897a7e0f34096ce1f2a04aceab7796d3a89c5
This commit is contained in:
portdirect 2018-01-10 13:40:11 -05:00
parent 666f7de6a1
commit 97d60dcccd
3 changed files with 45 additions and 0 deletions

View File

@ -92,6 +92,21 @@ spec:
- sysctl
- -w
- vm.max_map_count={{ .Values.conf.init.max_map_count }}
{{ if .Values.storage.filesystem_repository.enabled }}
- name: elasticsearch-repository-perms
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
securityContext:
runAsUser: 0
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
command:
- chown
- -R
- "elasticsearch:"
- {{ .Values.conf.elasticsearch.repository.location }}
volumeMounts:
- name: storage
mountPath: {{ .Values.conf.elasticsearch.repository.location }}
{{ end }}
containers:
- name: elasticsearch-client
securityContext:

View File

@ -57,6 +57,21 @@ spec:
- sysctl
- -w
- vm.max_map_count={{ .Values.conf.init.max_map_count }}
{{ if .Values.storage.filesystem_repository.enabled }}
- name: elasticsearch-repository-perms
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
securityContext:
runAsUser: 0
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
command:
- chown
- -R
- "elasticsearch:"
- {{ .Values.conf.elasticsearch.repository.location }}
volumeMounts:
- name: storage
mountPath: {{ .Values.conf.elasticsearch.repository.location }}
{{ end }}
containers:
- name: elasticsearch-master
securityContext:

View File

@ -89,6 +89,21 @@ spec:
- sysctl
- -w
- vm.max_map_count={{ .Values.conf.init.max_map_count }}
{{ if .Values.storage.filesystem_repository.enabled }}
- name: elasticsearch-repository-perms
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
securityContext:
runAsUser: 0
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
command:
- chown
- -R
- "elasticsearch:"
- {{ .Values.conf.elasticsearch.repository.location }}
volumeMounts:
- name: storage
mountPath: {{ .Values.conf.elasticsearch.repository.location }}
{{ end }}
containers:
- name: elasticsearch-data
securityContext: