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 | `{}` |
|
| `extraVolumeMounts` | Additional volume mounts for the Gitea containers | `{}` |
|
||||||
| `initPreScript` | Bash script copied verbatim to start of init container | |
|
| `initPreScript` | Bash script copied verbatim to start of init container | |
|
||||||
| `podSecurityContext.fsGroup` | Set the shared file system group for all containers | 1000 |
|
| `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" | |
|
| `schedulerName` | Use an alternate scheduler, e.g. "stork" | |
|
||||||
|
|
||||||
### Image
|
### Image
|
||||||
@ -602,6 +602,7 @@ gitea:
|
|||||||
| `persistence.size` | Size for persistence to store repo information | `10Gi` |
|
| `persistence.size` | Size for persistence to store repo information | `10Gi` |
|
||||||
| `persistence.accessModes` | AccessMode for persistence | |
|
| `persistence.accessModes` | AccessMode for persistence | |
|
||||||
| `persistence.storageClass` | Storage class for repository 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.labels` | Labels for the persistence volume claim to be created | `{}` |
|
||||||
| `persistence.annotations` | Annotations 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
|
mountPath: /tmp
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
{{- if .Values.persistence.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- if .Values.extraVolumeMounts }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@ -89,6 +92,9 @@ spec:
|
|||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
{{- if .Values.persistence.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- if .Values.extraVolumeMounts }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@ -161,6 +167,9 @@ spec:
|
|||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
{{- if .Values.persistence.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- if .Values.extraVolumeMounts }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@ -227,6 +236,9 @@ spec:
|
|||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
{{- if .Values.persistence.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.subPath }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- if .Values.extraVolumeMounts }}
|
||||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -121,6 +121,7 @@ persistence:
|
|||||||
labels: {}
|
labels: {}
|
||||||
annotations: {}
|
annotations: {}
|
||||||
# storageClass:
|
# storageClass:
|
||||||
|
# subPath:
|
||||||
|
|
||||||
# additional volumes to add to the Gitea statefulset.
|
# additional volumes to add to the Gitea statefulset.
|
||||||
extraVolumes:
|
extraVolumes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user