Add Gitea deployment, services, secrets, and persistent volume claims
This commit is contained in:
72
clusters/default/git-ops/gitea/gitea.yml
Normal file
72
clusters/default/git-ops/gitea/gitea.yml
Normal file
@@ -0,0 +1,72 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gitea-app
|
||||
namespace: git-ops
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitea-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gitea-app
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-for-db
|
||||
image: busybox
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
until nc -z -v -w30 gitea-db-service 5432; do
|
||||
echo "Waiting for psql database to be ready"
|
||||
sleep 2
|
||||
done
|
||||
containers:
|
||||
- name: gitea
|
||||
image: gitea/gitea:1.24.6
|
||||
ports:
|
||||
- containerPort: 22
|
||||
- containerPort: 3000
|
||||
env:
|
||||
- name: USER_UID
|
||||
value: "1000"
|
||||
- name: USER_GID
|
||||
value: "1000"
|
||||
- name: GITEA__database__DB_TYPE
|
||||
value: "postgres"
|
||||
- name: GITEA__database__HOST
|
||||
value: "gitea-db-service:5432"
|
||||
- name: GITEA__database__NAME
|
||||
value: "gitea"
|
||||
- name: GITEA__database__USER
|
||||
value: "gitea"
|
||||
- name: GITEA__database__PASSWD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-db-secret
|
||||
key: password
|
||||
volumeMounts:
|
||||
- name: gitea-data
|
||||
mountPath: /data
|
||||
- name: timezone
|
||||
mountPath: /etc/timezone
|
||||
- name: localtime
|
||||
mountPath: /etc/localtime
|
||||
volumes:
|
||||
- name: timezone
|
||||
hostPath:
|
||||
path: /etc/timezone
|
||||
type: File
|
||||
- name: localtime
|
||||
hostPath:
|
||||
path: /etc/localtime
|
||||
type: File
|
||||
- name: gitea-data
|
||||
persistentVolumeClaim:
|
||||
claimName: gitea-app-longhorn
|
||||
Reference in New Issue
Block a user