From 5f87cd79555f3ecf011e0a45d7213d8e7e510f7f Mon Sep 17 00:00:00 2001 From: Alex Manning Date: Wed, 6 Mar 2024 00:03:09 +0000 Subject: [PATCH] Forgejo pvcs --- charts/forgejo/Chart.yaml | 2 +- charts/forgejo/templates/pvc.yaml | 1 + charts/forgejo/templates/statefulset.yaml | 15 ++++++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/charts/forgejo/Chart.yaml b/charts/forgejo/Chart.yaml index 1e8bc33..9067852 100644 --- a/charts/forgejo/Chart.yaml +++ b/charts/forgejo/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.21.5-0" +appVersion: "1.21" diff --git a/charts/forgejo/templates/pvc.yaml b/charts/forgejo/templates/pvc.yaml index 9e2ac41..715b8df 100644 --- a/charts/forgejo/templates/pvc.yaml +++ b/charts/forgejo/templates/pvc.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/charts/forgejo/templates/statefulset.yaml b/charts/forgejo/templates/statefulset.yaml index 6f0619e..5dc59a7 100644 --- a/charts/forgejo/templates/statefulset.yaml +++ b/charts/forgejo/templates/statefulset.yaml @@ -30,7 +30,7 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"-rootless imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http @@ -46,6 +46,12 @@ spec: port: http resources: {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - name: config + mountPath: /etc/forgejo + readOnly: true + - name: repos + mountPath: /data/repos {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -58,3 +64,10 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + volumes: + - name: config + secret: + secretName: {{ include "forgejo.fullname" . }} + - name: repos + persistentVolumeClaim: + claimName: {{ include "forgejo.fullname" . }}-repos