ch4/planpalto-helm/gitea/gitea.yaml

76 lines
2.1 KiB
YAML

# Gitea git host for Argo CD. SQLite, single pod, one PVC. Installed OUTSIDE
# Argo (plain kubectl apply) because Argo pulls its manifests FROM Gitea, so
# Gitea cannot be an Argo-managed app in that same repo.
#
# kubectl apply -f planpalto-helm/gitea/gitea.yaml
#
# Sizing: ~128Mi idle, fits a t3.medium next to PlanPal + Argo.
apiVersion: v1
kind: Namespace
metadata:
name: gitea
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-data
namespace: gitea
spec:
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 5Gi
# storageClassName omitted -> cluster default (gp2/gp3 on EKS).
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
namespace: gitea
spec:
replicas: 1
strategy:
type: Recreate # single RWO volume, no rolling two-pod overlap
selector:
matchLabels: { app: gitea }
template:
metadata:
labels: { app: gitea }
spec:
containers:
- name: gitea
image: gitea/gitea:1.22
env:
- { name: GITEA__database__DB_TYPE, value: sqlite3 }
- { name: GITEA__server__ROOT_URL, value: "http://gitea-http.gitea.svc.cluster.local:3000/" }
- { name: GITEA__server__DISABLE_SSH, value: "true" } # HTTP-only; Argo uses HTTP
- { name: GITEA__service__DISABLE_REGISTRATION, value: "true" }
ports:
- { name: http, containerPort: 3000 }
volumeMounts:
- { name: data, mountPath: /data }
resources:
requests: { cpu: 100m, memory: 128Mi }
limits: { cpu: 500m, memory: 512Mi }
readinessProbe:
httpGet: { path: /api/healthz, port: 3000 }
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
httpGet: { path: /api/healthz, port: 3000 }
initialDelaySeconds: 30
periodSeconds: 15
volumes:
- name: data
persistentVolumeClaim: { claimName: gitea-data }
---
apiVersion: v1
kind: Service
metadata:
name: gitea-http
namespace: gitea
spec:
selector: { app: gitea }
ports:
- { name: http, port: 3000, targetPort: 3000 }