GitLab cross-site replication Phase 2b: home-side Gitaly network exposure

Per-pod NodePort Services for the 3 existing Gitaly nodes
(ha-gitaly-nodeport.yaml) plus home's Rails internal API
(ha-gitlab-internal-api-nodeport.yaml, needed for gitlab-shell hooks
whenever the VPS node is primary for a repo). PeerAuthentication
PERMISSIVE + AuthorizationPolicy port rules for both, matching the
proven Postgres pattern. CoreDNS rewrites so home's own Praefect
resolves the floating hostnames locally instead of round-tripping.

Reached over the Netbird mesh, not the UniFi WAN forward used for
Postgres - Gitaly gRPC here is plaintext (carries the gitaly_token,
gitlab_shell_secret, and raw repo contents), unlike CNPG's
TLS-negotiated stream.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Scooby Husky
2026-08-22 13:59:03 -05:00
co-authored by Claude Sonnet 5
parent e73561e5ca
commit 166ff0ffb7
5 changed files with 133 additions and 0 deletions
@@ -67,6 +67,16 @@ data:
rewrite name pg-gitlab.ha.huskypup.net ha-gitlab-postgres.gitlab.svc.cluster.local
rewrite name pg-praefect.ha.huskypup.net ha-praefect-postgres.gitlab.svc.cluster.local
# GitLab cross-site replication Phase 2b (Gitaly) - home's own
# Praefect dials these SAME floating hostnames it hands to the
# VPS's Gitaly node as peer addresses (Praefect uses one address
# per node for everyone, not different addresses per caller), so
# home's own in-cluster traffic to its own local Gitaly nodes
# needs to resolve locally too, same reasoning as pg-*.ha above.
rewrite name gitaly-0.ha.huskypup.net ha-gitaly-0.gitlab.svc.cluster.local
rewrite name gitaly-1.ha.huskypup.net ha-gitaly-1.gitlab.svc.cluster.local
rewrite name gitaly-2.ha.huskypup.net ha-gitaly-2.gitlab.svc.cluster.local
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
@@ -100,6 +100,8 @@ spec:
- "5432"
- "61442" # pg-gitlab floating-hostname port, see ha-postgres-nodeport.yaml
- "61443" # pg-praefect floating-hostname port, see ha-postgres-nodeport.yaml
- "8075" # Gitaly gRPC, see ha-gitaly-nodeport.yaml
- "8181" # Rails internal API, see ha-gitlab-internal-api-nodeport.yaml
---
# --- n8n: Allow ingress + Prometheus + intra-namespace ---