homek8s/apps/base/forgejo/deployment.yaml

87 lines
2.6 KiB
YAML
Raw Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
name: forgejo
namespace: forgejo
spec:
strategy:
type: Recreate
replicas: 1
selector:
matchLabels:
app: forgejo
template:
metadata:
labels:
app: forgejo
spec:
nodeSelector:
kubernetes.io/hostname: siriussec
containers:
- name: forgejo
image: codeberg.org/forgejo/forgejo:16
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
name: http
env:
- name: FORGEJO__database__DB_TYPE
value: postgres
- name: FORGEJO__database__HOST
value: pg-rw:5432
- name: FORGEJO__database__NAME
value: forgejo
- name: FORGEJO__database__USER
valueFrom:
secretKeyRef:
name: forgejo-pg-app
key: username
- name: FORGEJO__database__PASSWD
valueFrom:
secretKeyRef:
name: forgejo-pg-app
key: password
- name: FORGEJO__server__ROOT_URL
value: https://forgejo.siriusdevops.com/
- name: FORGEJO__server__DOMAIN
value: forgejo.siriusdevops.com
- name: FORGEJO__server__SSH_DOMAIN
value: forgejo.siriusdevops.com
- name: FORGEJO__server__SSH_PORT
value: "222"
- name: FORGEJO__server__PROTOCOL
value: http
- name: FORGEJO__security__INSTALL_LOCK
value: "true"
- name: FORGEJO__packages__ENABLED
value: "true"
# Bot signup lockdown: admin-only account creation (web + API).
- name: FORGEJO__service__DISABLE_REGISTRATION
value: "true"
volumeMounts:
- name: data
mountPath: /data
# Custom site-root assets (robots.txt). GITEA_CUSTOM=/data/gitea,
# so Forgejo serves /data/gitea/public/robots.txt at /robots.txt.
- name: custom-public
mountPath: /data/gitea/public
readOnly: true
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 20
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
memory: 2Gi
volumes:
- name: data
persistentVolumeClaim:
claimName: forgejo-data
- name: custom-public
configMap:
name: forgejo-custom-public