diff --git a/README.md b/README.md index a97bd84..5f6fad6 100644 --- a/README.md +++ b/README.md @@ -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 | `{}` | diff --git a/templates/gitea/statefulset.yaml b/templates/gitea/statefulset.yaml index 734f342..66dd287 100644 --- a/templates/gitea/statefulset.yaml +++ b/templates/gitea/statefulset.yaml @@ -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 }} diff --git a/values.yaml b/values.yaml index ef6f324..4704495 100644 --- a/values.yaml +++ b/values.yaml @@ -118,6 +118,7 @@ persistence: labels: {} annotations: {} # storageClass: + # subPath: # additional volumes to add to the Gitea statefulset. extraVolumes: