Skip to content

Commit

Permalink
Allow for arbitrary volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
gilles-gosuin committed Oct 11, 2023
1 parent 6a659de commit 54f2fdb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 12 additions & 2 deletions deployments/kubernetes/chart/reloader/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,15 @@ spec:
securityContext:
{{- toYaml $containerSecurityContext | nindent 10 }}

{{- if eq .Values.reloader.readOnlyRootFileSystem true }}
{{- if (or (.Values.reloader.deployment.volumeMounts) (eq .Values.reloader.readOnlyRootFileSystem true)) }}
volumeMounts:
{{- if eq .Values.reloader.readOnlyRootFileSystem true }}
- mountPath: /tmp/
name: tmp-volume
{{- end }}
{{- with .Values.reloader.deployment.volumeMounts }}
{{- . | toYaml | nindent 10 }}
{{- end }}
{{- end }}
{{- if or (.Values.reloader.logFormat) (.Values.reloader.ignoreSecrets) (.Values.reloader.ignoreNamespaces) (.Values.reloader.namespaceSelector) (.Values.reloader.resourceLabelSelector) (.Values.reloader.ignoreConfigMaps) (.Values.reloader.custom_annotations) (eq .Values.reloader.isArgoRollouts true) (eq .Values.reloader.reloadOnCreate true) (ne .Values.reloader.reloadStrategy "default") (.Values.reloader.enableHA) (.Values.reloader.autoReloadAll)}}
args:
Expand Down Expand Up @@ -241,8 +246,13 @@ spec:
{{- if hasKey .Values.reloader.deployment "automountServiceAccountToken" }}
automountServiceAccountToken: {{ .Values.reloader.deployment.automountServiceAccountToken }}
{{- end }}
{{- if eq .Values.reloader.readOnlyRootFileSystem true }}
{{- if (or (.Values.reloader.deployment.volumes) (eq .Values.reloader.readOnlyRootFileSystem true)) }}
volumes:
{{- if eq .Values.reloader.readOnlyRootFileSystem true }}
- emptyDir: {}
name: tmp-volume
{{- end }}
{{- with .Values.reloader.deployment.volumes }}
{{- . | toYaml | nindent 8 }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions deployments/kubernetes/chart/reloader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,8 @@ reloader:
# matchLabels:
# app.kubernetes.io/name: prometheus

volumeMounts: []

volumes: []

webhookUrl: ""

0 comments on commit 54f2fdb

Please sign in to comment.