Files
docker-images/apps/gitea.yaml
Udo Waechter c6a8464bb2
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
why _?111git statuskubectl apply -n kube-system -f descheduler-cronjob.yaml
2024-09-13 20:09:41 +02:00

179 lines
4.2 KiB
YAML

#we use postgresql:
#create database gitea;
#create user gitea with encrypted password 'secret';
#grant all privileges on database gitea to gitea;
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
labels:
app: gitea
release: latest
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: gitea
release: latest
template:
metadata:
labels:
app: gitea
release: latest
spec:
containers:
- name: gitea
image: gitea/gitea:latest
env:
- name: USER_UID
value: "1000"
- name: USER_GID
value: "1000"
- name: TZ
value: "Europe/Berlin"
- name: GITEA__lfs__PATH
value: /data/git/lfs
- name: DB_TYPE
value: postgres
- name: DB_HOST
value: postgres.live-env.svc.cluster.local:5432
- name: DB_NAME
value: gitea
- name: DB_USER
value: gitea
- name: DB_PASSWD
value: giteaEu94XSS4gKpheSBoMsIs
#- name: GITEA__indexer__ISSUE_INDEXER
#value: redis
#- name: GITEA__indexer__ISSUE_INDEXER_QUEUE_CONN_STR
#value: addrs=redis-standalone.live-env.svc.cluster.local:6379 db=1
- name: GITEA__packages__ENABLED
value: "true"
- name: GITEA__log__LEVEL
value: warn
- name: GITEA__log__MODE
value: file
- name: GITEA__log__ROUTER
value: file
- name: GITEA__log__MACARON
value: file
#- name: GITEA__queue__TYPE
#value: redis
#- name: GITEA__queue__CONN_STR
#value: redis://redis-standalone.live-env.svc.cluster.local:6397/0
- name: GITEA__server__ROOT_URL
value: http://git-ui.lan/
volumeMounts:
- name: gitea
mountPath: /data
ports:
- name: http
containerPort: 3000
protocol: TCP
- name: ssh
containerPort: 22
protocol : TCP
livenessProbe:
initialDelaySeconds: 300
periodSeconds: 10
httpGet:
path: /
port: http
readinessProbe:
initialDelaySeconds: 300
periodSeconds: 10
httpGet:
path: /
port: http
resources:
requests:
memory: "300Mi"
cpu: "150m"
limits:
memory: "512Mi"
cpu: "1000m"
volumes:
- name: gitea
persistentVolumeClaim:
claimName: gitea
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea
labels:
app: gitea
spec:
storageClassName: nfs-ssd-ebin02
volumeName: gitea
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: gitea
spec:
storageClassName: "nfs-ssd-ebin02"
nfs:
path: /data/raid1-ssd/k8s-data/gitea-data
server: ebin02
capacity:
storage: 20Gi
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
persistentVolumeReclaimPolicy: Retain
claimRef:
kind: PersistentVolumeClaim
name: gitea
namespace: live-env
---
apiVersion: v1
kind: Service
metadata:
name: gitea
labels:
app: gitea
spec:
type: LoadBalancer
loadBalancerIP: 172.23.255.2
ports:
- port: 3000
targetPort: http
protocol: TCP
name: http
- port: 22
targetPort: 22
name: ssh
selector:
app: gitea
release: latest
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gitea
annotations:
kubernetes.io/ingress.class: nginx
ingress.kubernetes.io/whitelist-x-forwarded-for: "true"
nginx.ingress.kubernetes.io/proxy-body-size: 512m
spec:
rules:
- host: git-ui.lan
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gitea
port:
number: 3000