Skip to content

Commit b8b4705

Browse files
add volume/mount capability and set readOnlyRootFileSystem=true (#470)
Co-authored-by: Romeo Dumitrescu <[email protected]>
1 parent 5fe8ccc commit b8b4705

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/helm/reflector/templates/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ spec:
7575
{{- end }}
7676
resources:
7777
{{- toYaml .Values.resources | nindent 12 }}
78+
volumeMounts:
79+
{{- toYaml .Values.volumeMounts | nindent 12 }}
7880
{{- with .Values.nodeSelector }}
7981
nodeSelector:
8082
{{- toYaml . | nindent 8 }}
@@ -87,6 +89,10 @@ spec:
8789
tolerations:
8890
{{- toYaml . | nindent 8 }}
8991
{{- end }}
92+
{{ - with .Values.volumes }}
93+
volumes:
94+
{{- toYaml . | nindent 8}}
95+
{{- end }}
9096
{{- with .Values.topologySpreadConstraints }}
9197
topologySpreadConstraints:
9298
{{- toYaml . | nindent 8 }}

src/helm/reflector/values.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ securityContext:
5656
capabilities:
5757
drop:
5858
- ALL
59-
readOnlyRootFilesystem: false
59+
readOnlyRootFilesystem: true
6060
runAsNonRoot: true
6161
runAsUser: 1000
6262

@@ -105,3 +105,12 @@ affinity: {}
105105
topologySpreadConstraints: []
106106

107107
priorityClassName: ""
108+
109+
#mount external persistent/ephemeral storage to required locations if readOnlyRootFileSystem=true
110+
volumes:
111+
- name: tmp
112+
emptyDir: {}
113+
114+
volumeMounts:
115+
- name: tmp
116+
mountPath: /tmp

0 commit comments

Comments
 (0)