Deploy real GitLab on the VPS (not just Gitea)

User wants actual GitLab on the VPS, not just Gitea's pull-mirror -
deliberate scope increase from the original plan's 'keep the VPS
lighter' design for git hosting specifically.

Simplified single-node equivalent of apps/gitlab (home) - same chart
version (7.7.0), same Authentik OIDC provider/client_id (added a second
redirect_uri to the shared GitLab provider in infrastructure/authentik/
gitlab-blueprint.yaml), same known chart bugs already diagnosed at home
(redis-init-fix.yaml for the initializer-ordering bug) - but:
  - 1 CNPG instance (local-path) instead of home's 3-instance HA
  - No Praefect - pointless HA routing with a single Gitaly node
  - No PgBouncer - direct CNPG connection, traffic is low enough
  - No SAML, no Container Registry, no KAS - addable later if needed
  - Own Traefik Ingress + https-redirect Middleware from the start
    (found needed the hard way on Vault/Gitea/n8n/Nextcloud/Authentik
    earlier this session - applying that lesson here immediately)

New Vault paths this needed: secret/vps/gitlab-redis (freshly generated,
this Redis instance is new, nothing to reuse) and widened the
vps-eso-reader policy to also allow secret/gitlab-oauth (the shared
Authentik client, already used by home's GitLab).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Scooby Husky
2026-08-20 21:04:48 -05:00
co-authored by Claude Sonnet 5
parent 220cdfb00a
commit 5670a941d4
9 changed files with 487 additions and 0 deletions
@@ -0,0 +1,84 @@
# Real GitLab on the VPS - standalone Redis, same pattern as home's
# apps/gitlab/manifests/redis-cluster.yaml (despite that file's name,
# it's already just a single standalone instance - "Sentinel" in the
# filename is legacy, not what's actually running). local-path storage
# instead of rook-ceph-block.
---
apiVersion: v1
kind: Service
metadata:
name: redis-gitlab
namespace: gitlab
spec:
ports:
- port: 6379
targetPort: 6379
name: redis
selector:
app: redis-gitlab
type: ClusterIP
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis-gitlab
namespace: gitlab
spec:
serviceName: redis-gitlab
replicas: 1
selector:
matchLabels:
app: redis-gitlab
template:
metadata:
labels:
app: redis-gitlab
spec:
securityContext:
fsGroup: 1000
containers:
- name: redis
image: redis:7.0-alpine
securityContext:
runAsUser: 999
runAsGroup: 1000
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
ports:
- containerPort: 6379
name: redis
command:
- sh
- -c
- redis-server --appendonly yes --requirepass "$REDIS_PASSWORD"
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-gitlab-secret
key: password
resources:
requests:
cpu: 25m
memory: 128Mi
limits:
memory: 512Mi
volumeMounts:
- name: data
mountPath: /data
- name: tmp
mountPath: /tmp
volumes:
- name: tmp
emptyDir: {}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: local-path
resources:
requests:
storage: 5Gi