k3s/namespaces/apps/forgejo/patches/deployment.yaml
2025-02-05 16:27:04 -05:00

72 lines
2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: app
spec:
template:
spec:
tolerations:
- key: "public"
operator: "Equal"
value: "true"
effect: "NoSchedule"
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: public
operator: In
values:
- "true"
containers:
- name: forgejo
image: codeberg.org/forgejo/forgejo:10
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: forgejo-config
env:
- name: FORGEJO__database__PASSWD
valueFrom:
secretKeyRef:
name: forgejo-secrets
key: FORGEJO_DB_PASSWORD
optional: false
- name: FORGEJO__mailer__PASSWD
valueFrom:
secretKeyRef:
name: smtp-secrets
key: SMTP_PASSWORD
optional: false
- name: FORGEJO__security__SECRET_KEY
valueFrom:
secretKeyRef:
name: forgejo-secrets
key: SECRET_KEY
optional: false
ports:
- containerPort: 3000
name: forgejo
- containerPort: 22
name: ssh
# livenessProbe:
# tcpSocket:
# port: forgejo
# initialDelaySeconds: 60
# periodSeconds: 10
# readinessProbe:
# httpGet:
# scheme: HTTP
# path: /
# port: forgejo
# initialDelaySeconds: 30
# periodSeconds: 10
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: forgejo-pvc