mirror of
https://gitlab.kube.huskypup.net/Scooby/Homelabv4.git
synced 2026-08-23 12:56:46 +00:00
GitLab cross-site replication Phase 1c (stage 1): VPS clusters as real replicas
Replaces VPS's independent standalone pg-gitlab (own initdb, own root/Scooby test data - never meant to survive this, per the approved plan) with a bootstrap.recovery replica of home's, matching the pg-authentik precedent. New pg-praefect cluster on the VPS too (never existed before - VPS ran Gitaly without Praefect). Stage 1 of 2: recovery-only, no streaming replication config yet - that needs this cluster's own CNPG-generated certs to exist first, which only happens once CNPG actually creates the cluster. Stage 2 (next commit) copies certs cross-cluster and adds externalClusters connectionParameters + replica.self/primary/source to all four Cluster CRs (home pg-gitlab/pg-praefect, VPS pg-gitlab/pg-praefect). postgresql.parameters copied verbatim from home's manifests (must match-or-exceed, confirmed live for pg-authentik). vps-minio-secret created manually on the VPS (kubectl, not git - same as every other cross-cluster secret in this plan) pointing at the VPS's own local MinIO, which now holds home's pg-gitlab/pg-praefect base backups (triggered manually via Backup CRs since neither had run yet). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ca94282552
commit
83c06a888d
@@ -0,0 +1,70 @@
|
||||
---
|
||||
# GitLab cross-site replication Phase 1c (see
|
||||
# /home/scooby/.claude/plans/jiggly-snacking-iverson.md) - the VPS never
|
||||
# had a pg-praefect cluster before (VPS ran Gitaly without Praefect,
|
||||
# global.praefect.enabled: false). This is new, matching home's
|
||||
# apps/gitlab/manifests/praefect-cnpg-cluster.yaml as a real replica.
|
||||
#
|
||||
# Same two-stage deployment as cnpg-cluster.yaml in this directory: this
|
||||
# commit is bootstrap.recovery only, streaming config added once this
|
||||
# cluster's own certs exist to copy cross-cluster.
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: pg-praefect
|
||||
namespace: gitlab
|
||||
spec:
|
||||
imageName: ghcr.io/cloudnative-pg/postgresql:16
|
||||
instances: 1
|
||||
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
|
||||
storage:
|
||||
size: 10Gi # matches home's size
|
||||
storageClass: local-path
|
||||
|
||||
primaryUpdateStrategy: unsupervised
|
||||
|
||||
# Must match-or-exceed home's - copied verbatim from
|
||||
# apps/gitlab/manifests/praefect-cnpg-cluster.yaml.
|
||||
postgresql:
|
||||
parameters:
|
||||
max_connections: "200"
|
||||
shared_buffers: "512MB"
|
||||
effective_cache_size: "1536MB"
|
||||
maintenance_work_mem: "128MB"
|
||||
checkpoint_completion_target: "0.9"
|
||||
wal_buffers: "16MB"
|
||||
default_statistics_target: "100"
|
||||
random_page_cost: "1.1"
|
||||
effective_io_concurrency: "200"
|
||||
work_mem: "4MB"
|
||||
min_wal_size: "1GB"
|
||||
max_wal_size: "4GB"
|
||||
max_worker_processes: "4"
|
||||
|
||||
bootstrap:
|
||||
recovery:
|
||||
source: home
|
||||
|
||||
externalClusters:
|
||||
- name: home
|
||||
barmanObjectStore:
|
||||
serverName: pg-praefect
|
||||
destinationPath: s3://cnpg-backups/pg-praefect
|
||||
endpointURL: http://vps-minio.minio.svc.cluster.local:9000
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
name: vps-minio-secret
|
||||
key: accesskey
|
||||
secretAccessKey:
|
||||
name: vps-minio-secret
|
||||
key: secretkey
|
||||
|
||||
monitoring:
|
||||
enablePodMonitor: false # no Prometheus on the VPS cluster
|
||||
Reference in New Issue
Block a user