mount root fs r/o

This commit is contained in:
David J. M. Karlsen
2019-12-09 23:16:32 +01:00
parent 8b31adcc1c
commit 41d29c2daa
4 changed files with 10 additions and 0 deletions

View File

@@ -68,6 +68,10 @@ spec:
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "memcached.metrics.image" . }}

View File

@@ -72,6 +72,10 @@ spec:
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
{{- end }}
{{- if .Values.persistence.enabled }}
volumeMounts:
- name: pv-data

View File

@@ -98,6 +98,7 @@ securityContext:
enabled: true
fsGroup: 1001
runAsUser: 1001
readOnlyRootFilesystem: true
## Pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/

View File

@@ -98,6 +98,7 @@ securityContext:
enabled: true
fsGroup: 1001
runAsUser: 1001
readOnlyRootFilesystem: true
## Pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/