feat(aula-10): migrar para Hetzner Object Storage + melhorias
Mudanças principais: - Substituir MinIO bundled por Hetzner Object Storage (S3) - Secrets YAML com envsubst para credenciais S3 - Anti-affinity preferencial (adapta a qualquer topologia) - Detecção automática de cert-manager existente - Menu TLS simplificado (Let's Encrypt/CloudFlare/HTTP) - Perguntar hostname do registry separadamente - Exibição unificada de TLS (não mais CloudFlare: true/false)
This commit is contained in:
@@ -76,8 +76,10 @@ nginx-ingress:
|
||||
|
||||
gitlab:
|
||||
# Webservice (Rails app - UI e API)
|
||||
# NOTA: antiAffinity garante que webservice e sidekiq rodem em nós diferentes
|
||||
# Isso evita OOM quando ambos competem por memória no mesmo nó CAX11 (4GB)
|
||||
# Anti-affinity preferencial: distribui se possível, mas não obriga
|
||||
# - 1 nó grande (8GB): tudo roda junto
|
||||
# - Múltiplos nós pequenos: distribui automaticamente
|
||||
# - Sem recursos: autoscaler cria nós novos
|
||||
webservice:
|
||||
minReplicas: 1
|
||||
maxReplicas: 1
|
||||
@@ -93,17 +95,18 @@ gitlab:
|
||||
threads:
|
||||
min: 1
|
||||
max: 2
|
||||
# Anti-affinity: não rodar no mesmo nó que sidekiq
|
||||
# Anti-affinity preferencial: tenta separar de sidekiq, mas não obriga
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
app: sidekiq
|
||||
topologyKey: kubernetes.io/hostname
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: sidekiq
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
||||
# Sidekiq (background jobs)
|
||||
# Anti-affinity: não rodar no mesmo nó que webservice
|
||||
sidekiq:
|
||||
minReplicas: 1
|
||||
maxReplicas: 1
|
||||
@@ -117,13 +120,16 @@ gitlab:
|
||||
# Desabilitar memory watchdog interno do GitLab (deixa o OOM killer do K8s gerenciar)
|
||||
memoryKiller:
|
||||
maxRss: 2000000000 # 2GB - maior que o limite para evitar kills prematuros
|
||||
# Anti-affinity preferencial: tenta separar de webservice, mas não obriga
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
app: webservice
|
||||
topologyKey: kubernetes.io/hostname
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: webservice
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
||||
# Gitaly (Git storage)
|
||||
gitaly:
|
||||
@@ -213,38 +219,31 @@ redis:
|
||||
storageClass: hcloud-volumes
|
||||
|
||||
# =============================================================================
|
||||
# MINIO (Object Storage)
|
||||
# OBJECT STORAGE (Hetzner Object Storage - S3 compatible)
|
||||
# =============================================================================
|
||||
# NOTA: As imagens padrão do GitLab chart não suportam ARM64.
|
||||
# Usamos as imagens oficiais multi-arch do MinIO.
|
||||
minio:
|
||||
install: true
|
||||
image: minio/minio
|
||||
imageTag: RELEASE.2024-06-13T22-53-53Z
|
||||
minioMc:
|
||||
image: minio/mc
|
||||
tag: RELEASE.2024-06-12T14-34-03Z
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: 50m
|
||||
limits:
|
||||
memory: 256Mi
|
||||
cpu: 200m
|
||||
persistence:
|
||||
size: 10Gi
|
||||
storageClass: hcloud-volumes
|
||||
# Usamos o Hetzner Object Storage ao invés do MinIO bundled.
|
||||
# Vantagens:
|
||||
# - Sem volume persistente (economia de $0.50/mês)
|
||||
# - Sem pod MinIO (economia de recursos)
|
||||
# - Storage ilimitado (paga por uso: €0.006/GB)
|
||||
# - Alta disponibilidade gerenciada pela Hetzner
|
||||
#
|
||||
# Pré-requisito: criar bucket e credenciais na Hetzner Console
|
||||
# O setup.sh cria o Secret gitlab-object-storage automaticamente
|
||||
|
||||
# Ou usar object storage externo (S3, etc):
|
||||
# global:
|
||||
# minio:
|
||||
# enabled: false
|
||||
# appConfig:
|
||||
# object_store:
|
||||
# enabled: true
|
||||
# connection:
|
||||
# secret: gitlab-object-storage
|
||||
# key: connection
|
||||
minio:
|
||||
install: false
|
||||
|
||||
global:
|
||||
minio:
|
||||
enabled: false
|
||||
appConfig:
|
||||
object_store:
|
||||
enabled: true
|
||||
proxy_download: true
|
||||
connection:
|
||||
secret: gitlab-object-storage
|
||||
key: connection
|
||||
|
||||
# =============================================================================
|
||||
# REGISTRY (Container Registry)
|
||||
@@ -261,7 +260,10 @@ registry:
|
||||
limits:
|
||||
memory: 256Mi
|
||||
cpu: 200m
|
||||
# Storage usa MinIO bundled automaticamente quando minio.install=true
|
||||
# Storage usa Hetzner Object Storage (configurado via global.appConfig.object_store)
|
||||
storage:
|
||||
secret: gitlab-registry-storage
|
||||
key: config
|
||||
|
||||
# =============================================================================
|
||||
# COMPONENTES DESABILITADOS (economia de recursos)
|
||||
|
||||
Reference in New Issue
Block a user