Gitea/manifests/deployment.yaml

86 lines
2.9 KiB
YAML
Raw Normal View History

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:
2023-06-30 21:42:51 +00:00
- containerPort: 3000
env:
- name: GITEA__database__DB_TYPE
value: "postgres"
- name: GITEA__database__HOST
2024-01-13 23:09:47 +00:00
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:
2024-01-13 23:09:47 +00:00
name: gitea-db
key: username
- name: GITEA__database__PASSWD
valueFrom:
secretKeyRef:
2024-01-13 23:09:47 +00:00
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
2023-07-03 10:41:15 +00:00
volumeMounts:
- mountPath: "/admin-creator.sh"
name: gitea-admin-creator
subPath: admin-creator.sh
2024-01-13 23:09:47 +00:00
- mountPath: "/data"
name: gitea-data
volumes:
2024-01-13 23:09:47 +00:00
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-pvc
2023-07-03 10:41:15 +00:00
- name: gitea-config-volume
configMap:
name: gitea-config
- name: gitea-admin-creator
configMap:
name: gitea-admin-creator