Gitea/manifests/deployment.yaml

58 lines
1.9 KiB
YAML

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.19.3
ports:
- containerPort: 3000
env:
- name: GITEA__database__DB_TYPE
value: "postgres"
- name: GITEA__database__HOST
value: "gitea.gitea.svc.cluster.local:5432"
- name: GITEA__database__NAME
value: "gitea"
- name: GITEA__database__USER
value: "gitea"
- name: GITEA__database__PASSWD
valueFrom:
secretKeyRef:
name: gitea.gitea.credentials.postgresql.acid.zalan.do
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-lfs-jwt-secret
key: token
volumeMounts:
- mountPath: "/data/gitea/conf/app.ini"
name: gitea-config-volume
subPath: app.ini
volumes:
- name: gitea-pv
hostPath:
path: "/mnt/gitea"
- name: gitea-config-volume
configMap:
name: gitea-config