k8s multiple regions config

This commit is contained in:
2026-08-21 14:24:31 -03:00
parent c0a657b7f7
commit b1fce379cd
8 changed files with 213 additions and 68 deletions

View File

@@ -8,6 +8,11 @@ TERMINATION_GRACE_SECONDS=600
DRAIN_SECONDS=30
PDB_MIN_AVAILABLE=2
# Logical xAI targets. Add/remove targets here without modifying scripts/YAML.
# A target represents one pool/upstream endpoint and does not need to be 1:1
# with an OCI region. This also supports multiple pools in the same region.
XAI_TARGETS="ORD IAD"
# Existing TIA resources
CPU_TIA_BRIDGE_REQ=250m
MEM_TIA_BRIDGE_REQ=512Mi
@@ -22,9 +27,8 @@ MEM_XAI_POOL_REQ=256Mi
CPU_XAI_POOL_LIM=1000m
MEM_XAI_POOL_LIM=768Mi
# Pool profile - 50 means 50 prewarmed upstream WebSockets PER POD.
# Tamanho do pool por réplica TIA. NÃO representa limite do OCI/xAI.
# Ajuste conforme capacidade negociada para o ambiente.
# Pool profile - XAI_POOL_SIZE means prewarmed upstream WebSockets PER POD.
# It is NOT the OCI/xAI service limit; tune it to the negotiated capacity.
XAI_POOL_SIZE=50
XAI_POOL_UNAVAILABLE_FREE=2
XAI_POOL_RECOVER_FREE=5
@@ -36,19 +40,37 @@ XAI_TTS_VOICE=c8x2ieiocufs
XAI_TTS_LANGUAGE=pt-BR
XAI_UPSTREAM_AUTH_METHOD=API_KEY
# HPA. replicas * XAI_POOL_SIZE deve respeitar a capacidade efetivamente negociada/provisionada para cada região/endpoint.
# HPA. replicas * XAI_POOL_SIZE must fit each target/endpoint capacity.
HPA_MIN_REPLICAS=1
HPA_MAX_REPLICAS=3
HPA_CPU_TARGET=65
# ORD
# Example target ORD
ORD_REGION_ID=ord
ORD_REGION_REPLICAS=1
ORD_XAI_UPSTREAM_URL=wss://peordagnt002prd.pe.inference.generativeai.us-chicago-1.oci.oraclecloud.com/xai/v1/tts
ORD_XAI_SECRET_NAME=xai-ord-credentials
# IAD
# Example target IAD
IAD_REGION_ID=iad
IAD_REGION_REPLICAS=1
IAD_XAI_UPSTREAM_URL=wss://peiadagnt003prd.pe.inference.generativeai.us-ashburn-1.oci.oraclecloud.com/xai/v1/tts
IAD_XAI_SECRET_NAME=xai-iad-credentials
# Add another region without changing code:
# XAI_TARGETS="ORD IAD GRU"
# GRU_REGION_ID=gru
# GRU_REGION_REPLICAS=1
# GRU_XAI_UPSTREAM_URL=wss://<endpoint>/xai/v1/tts
# GRU_XAI_SECRET_NAME=xai-gru-credentials
# Multiple independent pools in one OCI region are also supported:
# XAI_TARGETS="ORD_PRIMARY ORD_SECONDARY IAD"
# ORD_PRIMARY_REGION_ID=ord-primary
# ORD_PRIMARY_REGION_REPLICAS=1
# ORD_PRIMARY_XAI_UPSTREAM_URL=wss://<endpoint-a>/xai/v1/tts
# ORD_PRIMARY_XAI_SECRET_NAME=xai-ord-primary-credentials
# ORD_SECONDARY_REGION_ID=ord-secondary
# ORD_SECONDARY_REGION_REPLICAS=1
# ORD_SECONDARY_XAI_UPSTREAM_URL=wss://<endpoint-b>/xai/v1/tts
# ORD_SECONDARY_XAI_SECRET_NAME=xai-ord-secondary-credentials