Skip to content

Commit

Permalink
🐛 Add /tmp volume for sqlite (#380)
Browse files Browse the repository at this point in the history
The volume is required for temporary files, when the root filesystem is readonly

Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>
  • Loading branch information
mikebryant authored Dec 14, 2023
1 parent a0bd98a commit bf5decc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/policy-reporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: |
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
type: application
version: 2.21.4
version: 2.21.5
appVersion: 2.17.4

icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
Expand Down
8 changes: 8 additions & 0 deletions charts/policy-reporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ spec:
subPath: config.yaml
{{- end }}
readOnly: true
- name: tmp
mountPath: /tmp
{{- with .Values.extraVolumes.volumeMounts }}
{{ toYaml . | nindent 10 | trim }}
{{- end }}
Expand Down Expand Up @@ -120,6 +122,12 @@ spec:
secretName: {{ include "policyreporter.fullname" . }}-config
{{- end }}
optional: true
- name: tmp
{{- if .Values.tmpVolume }}
{{- toYaml .Values.tmpVolume | nindent 8 }}
{{- else }}
emptyDir: {}
{{- end }}
{{- with .Values.extraVolumes.volumes }}
{{ toYaml . | nindent 6 | trim }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/policy-reporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -742,3 +742,8 @@ extraVolumes:
sqliteVolume: {}
# emptyDir:
# sizeLimit: 10Mi

# If set the volume for /tmp is freely configurable below "- name: tmp". If no value is set an emptyDir is used.
tmpVolume: {}
# emptyDir:
# sizeLimit: 10Mi

0 comments on commit bf5decc

Please sign in to comment.