fix: corrigir tipos de servidor AMD (CPX→CX), autoscaler, stdin e cleanup
- Corrigir tipos Hetzner: CPX não existe, usar CX (Intel shared vCPU) - CX23 (2 vCPU, 4GB) equivalente ao CAX11 - CX33 (4 vCPU, 8GB) equivalente ao CAX21 - CX43 (8 vCPU, 16GB) equivalente ao CAX31 - Corrigir location no autoscaler para amd64 (nbg1→fsn1) - Remover gitlab-pool do autoscaler (substituído pelo Gitea) - Aumentar worker-pool max para 30 - Corrigir Floating IP e Load Balancer hardcoded em nbg1 - Corrigir stdin em read interativo: usar < /dev/tty e read -p - Corrigir cleanup de namespace: lidar com Terminating e finalizers - Corrigir CNPG: nome do deployment, secret e endpointURL duplo - Aulas afetadas: 08, 09, 10, 11, 12, 14, 17
This commit is contained in:
@@ -12,29 +12,15 @@ spec:
|
||||
# topology.kubernetes.io/zone = fsn1 | nbg1 | hel1 (datacenter)
|
||||
# topology.kubernetes.io/region = eu-central | hel-southeast
|
||||
#
|
||||
# Layer 1: podAntiAffinity on hostname (hard constraint)
|
||||
# → No 2 PG pods on the same node. Ever.
|
||||
# podAntiAffinityType: required → no 2 PG pods on same node (hard constraint)
|
||||
# topologyKey: kubernetes.io/hostname → spread across nodes
|
||||
#
|
||||
# Layer 2: podAntiAffinity on zone (soft constraint)
|
||||
# → Prefer spreading across datacenters. With nodes in fsn1, nbg1, hel1,
|
||||
# you get 1 pod per DC. With only eu-central nodes, they still spread
|
||||
# across FSN and NBG (both in eu-central, ~1-2ms apart).
|
||||
#
|
||||
# Prerequisite for cross-region (eu-central + HEL):
|
||||
# - Node pool in eu-central (FSN + NBG) → aula-08
|
||||
# - Node pool in hel-southeast (HEL) → add worker after aula-08
|
||||
# - Without HEL nodes, all 3 pods stay in eu-central (still HA within region)
|
||||
# For cross-DC spread, CNPG relies on Kubernetes scheduler topology awareness.
|
||||
# With nodes in multiple zones (fsn1, nbg1, hel1), the scheduler naturally
|
||||
# spreads pods when combined with the node autoscaler.
|
||||
affinity:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
podAntiAffinityType: required
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
topologyKey: topology.kubernetes.io/zone
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
cnpg.io/cluster: shared-postgres
|
||||
storage:
|
||||
size: 10Gi
|
||||
storageClass: hcloud-volumes
|
||||
@@ -60,10 +46,6 @@ spec:
|
||||
initdb:
|
||||
database: app
|
||||
owner: app
|
||||
secret:
|
||||
name: shared-postgres-superuser
|
||||
superuserSecret:
|
||||
name: shared-postgres-superuser
|
||||
backup:
|
||||
barmanObjectStore:
|
||||
destinationPath: s3://CHANGE_BUCKET_NAME/cnpg-backups/shared-postgres
|
||||
|
||||
Reference in New Issue
Block a user