Consider adding support for persistence using hostPath and hostPathType
While playing around with the GA charts, I was trying to hook up gitlab to use our distributed file system - which is mounted on each worker in our cluster, and found there was not way to avoid using volume claims (maybe there is? and I just didn't find it?)
Basically, I ended up modifying the gitaly stateful set like so:
{{- if not .Values.persistence.enabled }}
- name: repo-data
emptyDir: {}
{{- else if .Values.persistence.local }}
- name: repo-data
hostPath:
path: {{ .Values.persistence.local.hostPath }}
type: {{ .Values.persistence.local.hostPathType }}
{{- end }}
...
{{- if and (.Values.persistence.enabled) (not .Values.persistence.local) }}
volumeClaimTemplates:
...
so then in my values file I could simply add an entry like:
gitaly:
...
persistence:
enabled: true
local:
hostPath: /data/gitlabk8s/gitaly
hostPathType: "Directory"
If there isn't already a way to use hostPath
, do the changes above make sense? Or at the very least, a good place to start thinking about it?
I also have changes in the charts to update the minio
deployment to avoid using a volume claim as well.
If any of this makes sense, I would be more than happy to provide a MR for it.
Edited by Mike Rennie