mirror of
https://gitlab.kube.huskypup.net/Scooby/Homelabv4.git
synced 2026-08-23 12:56:46 +00:00
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>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
a309495e1e
commit
6cf1d89278
+23
-24
@@ -308,30 +308,29 @@ gitlab:
|
||||
# this one, so gitalyReplicas: 3 up there always won regardless of
|
||||
# what this said. See global.praefect.virtualStorages above for the
|
||||
# real config.)
|
||||
|
||||
# GitLab cross-site replication Phase 2a (see
|
||||
# /home/scooby/.claude/plans/jiggly-snacking-iverson.md) - redirects
|
||||
# Praefect's config template source so a hand-written config.toml.tpl
|
||||
# (praefect-ha-configmap.yaml) can add a VPS-hosted Gitaly node the
|
||||
# chart itself has no mechanism to register. The chart's own
|
||||
# gitlab-praefect ConfigMap is already mounted at
|
||||
# /etc/gitaly/templates (which CONFIG_TEMPLATE_DIRECTORY points at by
|
||||
# default) - can't add a second volume at that same path/name
|
||||
# (Kubernetes rejects duplicate volume names), so this mounts the
|
||||
# override at a different path and points CONFIG_TEMPLATE_DIRECTORY
|
||||
# there instead. Duplicate env var names in a container's env: list
|
||||
# resolve last-wins (documented Kubernetes behavior) - this entry
|
||||
# renders after the chart's own, so it's the one that takes effect.
|
||||
extraEnv:
|
||||
CONFIG_TEMPLATE_DIRECTORY: /etc/gitaly/templates-ha
|
||||
extraVolumes:
|
||||
- name: praefect-ha-config
|
||||
configMap:
|
||||
name: praefect-ha-config
|
||||
extraVolumeMounts:
|
||||
- name: praefect-ha-config
|
||||
mountPath: /etc/gitaly/templates-ha
|
||||
readOnly: true
|
||||
#
|
||||
# GitLab cross-site replication (see
|
||||
# /home/scooby/.claude/plans/jiggly-snacking-iverson.md): tried a
|
||||
# values-only CONFIG_TEMPLATE_DIRECTORY redirect (extraEnv +
|
||||
# extraVolumes/extraVolumeMounts) to add a VPS-hosted Gitaly node the
|
||||
# chart has no mechanism to register - confirmed live this doesn't
|
||||
# work: extraVolumeMounts and extraEnv both render correctly, but
|
||||
# extraVolumes is a dead values key for THIS subchart specifically -
|
||||
# charts/gitlab/charts/praefect/templates/statefulset.yaml's own
|
||||
# volumes: list never calls the gitlab.extraVolumes helper at all
|
||||
# (only volumeMounts does), so the mount has nothing to mount and the
|
||||
# pod would fail to schedule. No values-only fix exists.
|
||||
#
|
||||
# Real fix: argocd-apps/apps/gitlab.yaml's ignoreDifferences now
|
||||
# covers ConfigMap gitlab-praefect's `data` field, so Helm creates
|
||||
# the object (with its own 3-node content) but ArgoCD stops
|
||||
# reconciling its content afterward. The actual multi-node content
|
||||
# lives in apps/gitlab/manifests/praefect-ha-configmap.yaml as a
|
||||
# git-tracked reference/documentation copy (deployed under its own
|
||||
# name, praefect-ha-config, harmless and otherwise unused) - the
|
||||
# live gitlab-praefect ConfigMap gets kubectl-patched with that same
|
||||
# content directly, same "documented but manually-applied"
|
||||
# convention as every other cross-cluster secret in this plan.
|
||||
|
||||
# GitLab Exporter for Prometheus metrics
|
||||
gitlab-exporter:
|
||||
|
||||
Reference in New Issue
Block a user