Files
homelab/k8s/apps/gitea/deployment.yaml
T
Ultradesu 897498eedb
Auto-update README / Generate README and Create MR (push) Successful in 11s
Check with kubeconform / lint (push) Successful in 18s
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Failing after 11m46s
Fixed gitea runner
2026-05-05 14:28:00 +01:00

158 lines
4.3 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
labels:
app: gitea
spec:
selector:
matchLabels:
app: gitea
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: gitea
spec:
nodeSelector:
kubernetes.io/hostname: master.tail2fe2d.ts.net
volumes:
- name: storage
hostPath:
path: /k8s/gitea
type: Directory
containers:
- name: gitea
image: 'gitea/gitea:latest'
resources:
requests:
memory: "512Mi"
cpu: "200m"
limits:
memory: "2Gi"
cpu: "1500m"
env:
- name: GITEA__service__REGISTER_MANUAL_CONFIRM
value: "true"
- name: GITEA__service__ENABLE_CAPTCHA
value: "false"
- name: GITEA__service__REQUIRE_CAPTCHA_FOR_LOGIN
value: "true"
- name: GITEA__service__REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA
value: "true"
- name: GITEA__service__CAPTCHA_TYPE
value: "hcaptcha"
- name: GITEA__webhook__ALLOWED_HOST_LIST
value: "*"
envFrom:
- secretRef:
name: gitea-recapcha-creds
ports:
- name: http
containerPort: 3000
protocol: TCP
- name: ssh
containerPort: 22
protocol: TCP
volumeMounts:
- name: storage
mountPath: /data
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-runner
spec:
replicas: 2
selector:
matchLabels:
app: gitea-runner
template:
metadata:
labels:
app: gitea-runner
spec:
dnsConfig:
options:
- name: ndots
value: "2"
tolerations:
- key: workload
operator: Equal
value: desktop
effect: NoSchedule
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
type: Socket
- name: runner-data
emptyDir:
sizeLimit: 30Gi
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: gitea-runner
topologyKey: kubernetes.io/hostname
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 5
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- uk-desktop.tail2fe2d.ts.net
- ai.tail2fe2d.ts.net
- weight: 10
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- home.homenet
- ch.tail2fe2d.ts.net
containers:
- name: gitea-runner
image: gitea/act_runner:nightly
resources:
#requests:
# cpu: "100m"
# memory: "256Mi"
# ephemeral-storage: "1Gi"
#limits:
# cpu: "3000m"
# memory: "4Gi"
# ephemeral-storage: "28Gi"
volumeMounts:
- name: docker-sock
mountPath: /var/run/docker.sock
- name: runner-data
mountPath: /data
env:
- name: GITEA_INSTANCE_URL
#value: "http://gitea.gitea.svc.cluster.local"
value: "https://gt.hexor.cy"
- name: GITEA_RUNNER_REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
name: gitea-runner-act-runner-secrets
key: token
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: GITEA_RUNNER_NAME
value: "$(NODE_NAME)"
- name: GITEA_RUNNER_LABELS
value: "ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest,ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04,ubuntu-20.04:docker://ghcr.io/catthehacker/ubuntu:act-20.04"