apiVersion: v1 kind: PersistentVolumeClaim metadata: name: gitea-pvc spec: storageClassName: "" volumeName: gitea-pv --- apiVersion: v1 kind: PersistentVolume metadata: name: gitea-pv spec: storageClassName: "" claimRef: name: gitea-pvc --- apiVersion: apps/v1 kind: Deployment metadata: name: gitea labels: app.kubernetes.io/name: gitea spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: gitea template: metadata: labels: app.kubernetes.io/name: gitea spec: #securityContext: # runAsUser: 1000 # fsGroup: 1000 volumes: #- name: config # nfs: # server: 192.168.0.99 # path: /mnt/test1/media/config/gitea - name: gitea persistentVolumeClaim: claimName: gitea-pvc - name: data nfs: server: 192.168.0.99 path: /mnt/test1/media/data/gitea containers: - name: gitea image: gitea/gitea:latest livenessProbe: httpGet: path: /api/healthz port: 3000 initialDelaySeconds: 200 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 10 periodSeconds: 10 env: - name: USER_UID value: "1000" - name: USER_GID value: "1000" ports: - containerPort: 3000 - containerPort: 22 volumeMounts: - name: data mountPath: /data - name: gitea mountPath: /data/ssh #mountPath: /var/lib/gitea #- name: config #mountPath: /etc/gitea