GitLab is a complete DevOps platform providing Git repository hosting, CI/CD pipelines, issue tracking, and container registry.
- Namespace:
gitops - Version: Community Edition (latest)
- Port: 80/443 (application), 443 (nginx-tls)
- Storage: 50Gi for repositories, 10Gi each for PostgreSQL/Redis
- Access: VPN-only via HTTPS
- Authentication: LDAP via FreeIPA (optional) + local users
- Git Repository Hosting - Full Git server with web interface
- CI/CD Pipelines - Built-in continuous integration and deployment
- Container Registry - Docker image registry
- Issue Tracking - Project management and bug tracking
- Wiki - Documentation platform
- Merge Requests - Code review workflow
- LDAP Integration - FreeIPA authentication support
GitLab in Charon follows the 3-container StatefulSet pattern:
┌─────────────────────────────────────────┐
│ GitLab StatefulSet │
├─────────────────────────────────────────┤
│ ┌──────────┐ ┌────────────────────┐ │
│ │ nginx- │─▶│ GitLab CE │ │
│ │ tls │ │ (port 80) │ │
│ │ (443) │ └────────────────────┘ │
│ └──────────┘ │ │
│ ▼ │
│ ┌──────────────────┐ │
│ │ PostgreSQL │ │
│ │ (built-in) │ │
│ └──────────────────┘ │
│ │ │
│ ┌──────────────────┐ │
│ │ Redis │ │
│ │ (built-in) │ │
│ └──────────────────┘ │
│ │
│ ┌──────────┐ │
│ │Tailscale │ VPN connectivity │
│ └──────────┘ │
└─────────────────────────────────────────┘
In terraform.tfvars:
gitlab_enabled = true
gitlab_hostname = "gitlab.example.com"
gitlab_tailscale_enabled = truecd terraform
terraform applyThis will:
- Deploy GitLab StatefulSet with PostgreSQL and Redis
- Configure TLS certificates via cert-manager
- Set up DNS records automatically
- Enable VPN access via Tailscale
After deployment:
# Connect to VPN first
tailscale up --login-server https://vpn.example.com
# Access GitLab
open https://gitlab.example.com# GitLab generates a random root password on first startup
kubectl exec -n gitops gitlab-0 -c gitlab -- \
cat /etc/gitlab/initial_root_password- Login with username
rootand the initial password - Change the root password immediately
- Create admin users as needed
GitLab can be configured to use FreeIPA for authentication:
- Access GitLab admin panel
- Navigate to Admin → Settings → General → LDAP
- Configure with FreeIPA settings:
- Host:
freeipa.core.svc.cluster.local - Port:
636(LDAPS) - Base DN:
cn=users,cn=accounts,dc=example,dc=org
- Host:
GitLab uses persistent volumes for:
- Git repositories: 50Gi
- PostgreSQL database: 10Gi
- Redis cache: 10Gi
- GitLab config: 1Gi
All volumes use the block_storage_class_retain StorageClass to prevent data loss.
# Create a backup
kubectl exec -n gitops gitlab-0 -c gitlab -- \
gitlab-backup create
# List backups
kubectl exec -n gitops gitlab-0 -c gitlab -- \
ls /var/opt/gitlab/backups# Stop GitLab services
kubectl exec -n gitops gitlab-0 -c gitlab -- \
gitlab-ctl stop unicorn
kubectl exec -n gitops gitlab-0 -c gitlab -- \
gitlab-ctl stop sidekiq
# Restore backup (replace TIMESTAMP)
kubectl exec -n gitops gitlab-0 -c gitlab -- \
gitlab-backup restore BACKUP=TIMESTAMP_gitlab_backup.tar
# Restart GitLab
kubectl exec -n gitops gitlab-0 -c gitlab -- \
gitlab-ctl restart# View pod status
kubectl get pod -n gitops gitlab-0
# Check GitLab services
kubectl exec -n gitops gitlab-0 -c gitlab -- gitlab-ctl status
# View logs
kubectl logs -n gitops gitlab-0 -c gitlab
kubectl logs -n gitops gitlab-0 -c nginx-tls
kubectl logs -n gitops gitlab-0 -c tailscaleGitLab not starting:
- Check available storage:
kubectl get pvc -n gitops - Verify PostgreSQL is running:
kubectl exec -n gitops gitlab-0 -c gitlab -- gitlab-psql --version
Cannot access via HTTPS:
- Verify certificate:
kubectl get certificate -n gitops gitlab-tls - Check nginx-tls logs:
kubectl logs -n gitops gitlab-0 -c nginx-tls
CI/CD runners not connecting:
- Ensure runners are on VPN network
- Check runner registration token in Admin → Overview → Runners
# Get registration token from GitLab UI or:
kubectl exec -n gitops gitlab-0 -c gitlab -- \
gitlab-rails runner "puts Gitlab::CurrentSettings.current_application_settings.runners_registration_token"
# Register runner (from runner machine)
gitlab-runner register \
--url https://gitlab.example.com \
--registration-token <token>- StatefulSet Pattern - Multi-container deployment pattern
- Adding Services - Guide for adding new services
- GitLab Documentation
Navigation: Documentation Index | Services | Home