apiVersion: apps/v1 kind: Deployment metadata: name: gitea namespace: gitea spec: replicas: 1 selector: matchLabels: app: gitea template: metadata: labels: app: gitea spec: hostname: gitea subdomain: gitea containers: - name: gitea image: gitea/gitea:1.22.4 ports: - containerPort: 3000 env: - name: GITEA__database__DB_TYPE value: "postgres" - name: GITEA__database__HOST value: "gitea-db-rw.gitea.svc.cluster.local:5432" - name: GITEA__database__NAME value: "gitea" - name: GITEA__database__SSL_MODE value: "require" - name: GITEA__database__USER valueFrom: secretKeyRef: name: gitea-db key: username - name: GITEA__database__PASSWD valueFrom: secretKeyRef: name: gitea-db key: password - name: GITEA__server__LFS_JWT_SECRET valueFrom: secretKeyRef: name: gitea-lfs-jwt-secret key: token - name: GITEA__security__INTERNAL_TOKEN valueFrom: secretKeyRef: name: gitea-internal-token key: token - name: ADMIN_USER valueFrom: secretKeyRef: name: gitea-admin-user key: token - name: ADMIN_PASSWORD valueFrom: secretKeyRef: name: gitea-admin-password key: token - name: ADMIN_MAIL valueFrom: secretKeyRef: name: gitea-admin-mail key: token envFrom: - configMapRef: name: gitea-config volumeMounts: - mountPath: "/admin-creator.sh" name: gitea-admin-creator subPath: admin-creator.sh - mountPath: "/data" name: gitea-data volumes: - name: gitea-data persistentVolumeClaim: claimName: gitea-pvc - name: gitea-config-volume configMap: name: gitea-config - name: gitea-admin-creator configMap: name: gitea-admin-creator