Files
HomeLabScripts/k3s/apps/gitLab/manifest/gitlab-deployment.yaml
T
henry 39079615f5 Add migration scripts and manifests for GitLab and Gitea to Longhorn
- Create .vscode/settings.json for YAML schema validation.
- Add WISSENSBASIS.md for documentation on HomeLabScripts.
- Implement migration job for GitLab from NFS to Longhorn with migrate-to-longhorn.yaml and migrate-to-longhorn.sh.
- Add Gitea migration scripts and manifests for PostgreSQL to Longhorn.
- Create persistent volume claims and deployments for Gitea and Homarr.
- Set up namespaces and services for Homarr and Speedtest Tracker.
- Add secrets for Homarr and Speedtest Tracker with sensitive data.
- Configure Ingress for Speedtest Tracker with Traefik annotations.

Co-authored-by: Copilot <copilot@github.com>
2026-04-24 23:08:23 +02:00

119 lines
3.5 KiB
YAML

# ─── Deployment ───────────────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitlab
namespace: gitlab
labels:
app: gitlab
spec:
replicas: 1
selector:
matchLabels:
app: gitlab
strategy:
type: Recreate
template:
metadata:
labels:
app: gitlab
spec:
initContainers:
- name: fix-permissions
image: busybox
command:
- sh
- -c
- mkdir -p /var/opt/gitlab/git-data
volumeMounts:
- name: gitlab-data
mountPath: /var/opt/gitlab
- name: gitlab-git
mountPath: /var/opt/gitlab/git-data
- name: gitlab-config
mountPath: /etc/gitlab
containers:
- name: gitlab
image: gitlab/gitlab-ce:latest
imagePullPolicy: IfNotPresent
securityContext:
capabilities:
add:
- SYS_RESOURCE
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
- name: ssh
containerPort: 22
envFrom:
- configMapRef:
name: gitlab-config
- secretRef:
name: gitlab-secrets
resources:
requests:
memory: "4Gi"
cpu: "1000m"
limits:
memory: "8Gi"
cpu: "4000m"
# ─── Mounts ─────────────────────────────────────────────
volumeMounts:
- name: gitlab-data # → lokal (postgresql, redis, etc.)
mountPath: /var/opt/gitlab
- name: gitlab-git # → NFS (Git-Repositories)
mountPath: /var/opt/gitlab/git-data
- name: gitlab-config # → lokal
mountPath: /etc/gitlab
- name: gitlab-logs # → ephemeral
mountPath: /var/log/gitlab
- name: shm
mountPath: /dev/shm
startupProbe:
exec:
command: ["curl", "-sf", "http://localhost/-/health"]
failureThreshold: 40
periodSeconds: 15
readinessProbe:
exec:
command: ["curl", "-sf", "http://localhost/-/health"]
periodSeconds: 15
failureThreshold: 3
livenessProbe:
exec:
command: ["curl", "-sf", "http://localhost/-/health"]
periodSeconds: 30
failureThreshold: 5
# ─── Volumes ──────────────────────────────────────────────────
volumes:
- name: gitlab-data # lokal (postgresql, redis, etc.)
persistentVolumeClaim:
claimName: gitlab-data-longhorn-pvc
- name: gitlab-git # NFS (Git-Repositories)
persistentVolumeClaim:
claimName: gitlab-git-pvc
- name: gitlab-config # lokal
persistentVolumeClaim:
claimName: gitlab-config-longhorn-pvc
- name: gitlab-logs # ephemeral
emptyDir: {}
- name: shm
emptyDir:
medium: Memory
sizeLimit: 256Mi