2023-06-30 21:22:44 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: gitea
|
|
|
|
namespace: gitea
|
|
|
|
spec:
|
2024-01-19 23:28:51 +00:00
|
|
|
replicas: 2
|
2023-06-30 21:22:44 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: gitea
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: gitea
|
|
|
|
spec:
|
|
|
|
hostname: gitea
|
|
|
|
subdomain: gitea
|
|
|
|
containers:
|
|
|
|
- name: gitea
|
2023-06-30 21:40:11 +00:00
|
|
|
image: gitea/gitea:1.19.3
|
2023-06-30 21:22:44 +00:00
|
|
|
ports:
|
2023-06-30 21:42:51 +00:00
|
|
|
- containerPort: 3000
|
2023-07-04 15:15:04 +00:00
|
|
|
lifecycle:
|
|
|
|
postStart:
|
|
|
|
exec:
|
|
|
|
command: ["sh", "-c", "sleep 1 && su git -c 'sh /admin-creator.sh'"]
|
2023-06-30 21:22:44 +00:00
|
|
|
env:
|
2023-07-03 10:29:17 +00:00
|
|
|
- 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"
|
2023-07-03 10:29:17 +00:00
|
|
|
- name: GITEA__database__NAME
|
|
|
|
value: "gitea"
|
2023-07-04 15:15:04 +00:00
|
|
|
- name: GITEA__database__SSL_MODE
|
|
|
|
value: "require"
|
2023-07-03 10:29:17 +00:00
|
|
|
- name: GITEA__database__USER
|
2023-07-04 15:15:04 +00:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2024-01-13 23:09:47 +00:00
|
|
|
name: gitea-db
|
2023-07-04 15:15:04 +00:00
|
|
|
key: username
|
2023-07-03 10:29:17 +00:00
|
|
|
- name: GITEA__database__PASSWD
|
2023-06-30 21:22:44 +00:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2024-01-13 23:09:47 +00:00
|
|
|
name: gitea-db
|
2023-06-30 21:22:44 +00:00
|
|
|
key: password
|
2023-07-03 10:29:17 +00:00
|
|
|
- name: GITEA__server__LFS_JWT_SECRET
|
2023-06-30 21:22:44 +00:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2023-07-03 10:12:23 +00:00
|
|
|
name: gitea-lfs-jwt-secret
|
|
|
|
key: token
|
2023-07-03 10:29:17 +00:00
|
|
|
- name: GITEA__security__INTERNAL_TOKEN
|
2023-07-03 10:12:23 +00:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2023-07-04 15:15:04 +00:00
|
|
|
name: gitea-internal-token
|
|
|
|
key: token
|
|
|
|
- name: ADMIN_USER
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: gitea-admin-user
|
2023-06-30 21:22:44 +00:00
|
|
|
key: token
|
2023-07-04 15:15:04 +00:00
|
|
|
- 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:
|
2023-07-04 15:15:04 +00:00
|
|
|
- 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
|
2023-06-30 21:22:44 +00:00
|
|
|
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
|
2023-07-04 15:15:04 +00:00
|
|
|
- name: gitea-admin-creator
|
|
|
|
configMap:
|
|
|
|
name: gitea-admin-creator
|