Files
Homelabv4/argocd-apps/apps/gitlab.yaml
T
Scooby HuskyandClaude Sonnet 5 6cf1d89278 GitLab cross-site replication Phase 2a (corrected): ignoreDifferences approach
The CONFIG_TEMPLATE_DIRECTORY redirect from the previous commit doesn't
work - confirmed live that extraVolumes is a dead values key for the
Praefect subchart specifically (its statefulset.yaml never calls the
gitlab.extraVolumes helper in its volumes: list, only volumeMounts
calls the corresponding helper - a real chart limitation, not a config
mistake). A dangling volumeMount with no matching volume would have
failed to schedule.

Real fix: ignoreDifferences on ConfigMap gitlab-praefect's data field
(argocd-apps/apps/gitlab.yaml) lets Helm create the object normally
while ArgoCD stops reconciling its content afterward - the actual
config gets kubectl-patched onto the live object directly.
praefect-ha-configmap.yaml is now a git-tracked reference/documentation
copy (deployed under its own harmless name) rather than something
Helm/ArgoCD wires in on its own.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 13:54:43 -05:00

61 lines
1.9 KiB
YAML

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: gitlab
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "50"
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: applications
sources:
- repoURL: https://charts.gitlab.io
chart: gitlab
targetRevision: 7.7.0
helm:
valueFiles:
- $values/apps/gitlab/values.yaml
- repoURL: https://gitlab.kube.huskypup.net/Scooby/Homelabv4.git
targetRevision: main
ref: values
- repoURL: https://gitlab.kube.huskypup.net/Scooby/Homelabv4.git
targetRevision: main
path: apps/gitlab/manifests
destination:
server: https://kubernetes.default.svc
namespace: gitlab
ignoreDifferences:
# Redis operator reconciles this service with different port names and selectors
- group: ""
kind: Service
name: redis-gitlab-additional
jsonPointers:
- /spec/ports
- /spec/selector
# GitLab cross-site replication (see
# /home/scooby/.claude/plans/jiggly-snacking-iverson.md) - the chart
# has no mechanism to register an externally-hosted (VPS) Gitaly node
# into Praefect's virtual storage. Lets the live ConfigMap's `data`
# be kubectl-patched directly (see apps/gitlab/manifests/
# praefect-ha-configmap.yaml for the content + patch command) without
# ArgoCD reverting it on the next sync - Helm still creates the
# object and everything else about it stays normally managed.
- group: ""
kind: ConfigMap
name: gitlab-praefect
jsonPointers:
- /data
syncPolicy:
automated:
prune: true
selfHeal: true
managedNamespaceMetadata:
labels:
pod-security.kubernetes.io/enforce: privileged
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
- ServerSideDiff=true
- RespectIgnoreDifferences=true