add support for persistence.subPath option (#263)
Hello, PR adds a `persistence.subPath` option to provide user more flexibility on mounting the `data` PV. https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath The setting is similar to e.g. `primary.persistence.subPath` in MariaDB helm chart: https://github.com/bitnami/charts/tree/master/bitnami/mariadb Co-authored-by: Aleksey Sergey <sergey.aleksey90@gmail.com> Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/263 Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.io> Reviewed-by: luhahn <luhahn@noreply.gitea.io> Co-authored-by: aleksey.sergey <aleksey.sergey@noreply.gitea.io> Co-committed-by: aleksey.sergey <aleksey.sergey@noreply.gitea.io>
This commit is contained in:
parent
d97b1567e2
commit
cd09ccfcdb
|
@ -581,7 +581,7 @@ gitea:
|
|||
| `extraVolumeMounts` | Additional volume mounts for the Gitea containers | `{}` |
|
||||
| `initPreScript` | Bash script copied verbatim to start of init container | |
|
||||
| `podSecurityContext.fsGroup` | Set the shared file system group for all containers | 1000 |
|
||||
| `containerSecurityContext` | Run init and gitea containers as a specific securityContext | `{}` |
|
||||
| `containerSecurityContext` | Run init and Gitea containers as a specific securityContext | `{}` |
|
||||
| `schedulerName` | Use an alternate scheduler, e.g. "stork" | |
|
||||
|
||||
### Image
|
||||
|
@ -602,6 +602,7 @@ gitea:
|
|||
| `persistence.size` | Size for persistence to store repo information | `10Gi` |
|
||||
| `persistence.accessModes` | AccessMode for persistence | |
|
||||
| `persistence.storageClass` | Storage class for repository persistence | |
|
||||
| `persistence.subPath` | Subdirectory of the volume to mount at | |
|
||||
| `persistence.labels` | Labels for the persistence volume claim to be created | `{}` |
|
||||
| `persistence.annotations` | Annotations for the persistence volume claim to be created | `{}` |
|
||||
|
||||
|
|
|
@ -62,6 +62,9 @@ spec:
|
|||
mountPath: /tmp
|
||||
- name: data
|
||||
mountPath: /data
|
||||
{{- if .Values.persistence.subPath }}
|
||||
subPath: {{ .Values.persistence.subPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
|
@ -89,6 +92,9 @@ spec:
|
|||
mountPath: /tmp
|
||||
- name: data
|
||||
mountPath: /data
|
||||
{{- if .Values.persistence.subPath }}
|
||||
subPath: {{ .Values.persistence.subPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
|
@ -161,6 +167,9 @@ spec:
|
|||
mountPath: /tmp
|
||||
- name: data
|
||||
mountPath: /data
|
||||
{{- if .Values.persistence.subPath }}
|
||||
subPath: {{ .Values.persistence.subPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
|
@ -227,6 +236,9 @@ spec:
|
|||
mountPath: /tmp
|
||||
- name: data
|
||||
mountPath: /data
|
||||
{{- if .Values.persistence.subPath }}
|
||||
subPath: {{ .Values.persistence.subPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -121,6 +121,7 @@ persistence:
|
|||
labels: {}
|
||||
annotations: {}
|
||||
# storageClass:
|
||||
# subPath:
|
||||
|
||||
# additional volumes to add to the Gitea statefulset.
|
||||
extraVolumes:
|
||||
|
|
Loading…
Reference in New Issue