282 lines
5.8 KiB
YAML
282 lines
5.8 KiB
YAML
# Custom values for Bifrost (ai-gateway) - Meesho Production
|
|
# Usage: helm install bifrost ./helm-templates/bifrost/ -f ./helm-templates/bifrost/custom-values.yaml -n int-ai-gateway
|
|
|
|
# -- Deployment Configuration --
|
|
replicaCount: 2
|
|
|
|
fullnameOverride: "int-ai-gateway"
|
|
|
|
image:
|
|
repository: docker.io/maximhq/bifrost
|
|
pullPolicy: IfNotPresent
|
|
tag: "v1.4.7"
|
|
|
|
# -- Service Account --
|
|
serviceAccount:
|
|
create: true
|
|
automount: true
|
|
annotations:
|
|
iam.gke.io/gcp-service-account: sa-dvops-ai-gateway@meesho-central-prd-0622.iam.gserviceaccount.com
|
|
name: "int-ai-gateway"
|
|
|
|
# -- Pod Metadata --
|
|
deploymentLabels:
|
|
bu: central
|
|
env: int
|
|
team: devops
|
|
priority: p1
|
|
priority_v2: sp1
|
|
primary_owner: deep.shah
|
|
secondary_owner: mahak.jain
|
|
service: ai-gateway
|
|
service_type: producer-httpstateless
|
|
|
|
podLabels:
|
|
bu: central
|
|
env: int
|
|
team: devops
|
|
priority: p1
|
|
priority_v2: sp1
|
|
primary_owner: deep.shah
|
|
secondary_owner: mahak.jain
|
|
service: ai-gateway
|
|
service_type: producer-httpstateless
|
|
|
|
podAnnotations:
|
|
prometheus.io/path: /metrics
|
|
prometheus.io/port: "8080"
|
|
prometheus.io/scrape: "true"
|
|
telegraf.influxdata.com/class: infra
|
|
|
|
# -- Security Context --
|
|
podSecurityContext:
|
|
fsGroup: 65534
|
|
runAsUser: 65534
|
|
runAsGroup: 65534
|
|
runAsNonRoot: true
|
|
|
|
securityContext:
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: false
|
|
runAsNonRoot: true
|
|
runAsUser: 65534
|
|
|
|
# -- Service --
|
|
service:
|
|
type: ClusterIP
|
|
port: 8080
|
|
|
|
# -- Contour HTTPProxy --
|
|
# ingress.enabled=false disables Bifrost's official K8s Ingress
|
|
# httpProxy.enabled=true enables the Meesho Contour HTTPProxy templates
|
|
# HTTPProxy templates read from ingress.* for hosts, class, etc.
|
|
httpProxy:
|
|
enabled: true
|
|
createContourGateway: true
|
|
namespace: int-ai-gateway
|
|
contourResponseTimeout: false
|
|
ingress:
|
|
enabled: false
|
|
ingressClassName: contour-internal-1
|
|
servicePortNumber: 8080
|
|
enableWebsocket: false
|
|
hosts:
|
|
- host: ai-gateway.int.meesho.int
|
|
paths:
|
|
- path: /
|
|
pathType: ImplementationSpecific
|
|
slowStart:
|
|
enabled: false
|
|
aggression: 1
|
|
minPercent: 10
|
|
window: 120s
|
|
|
|
# -- Resources --
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: 2Gi
|
|
requests:
|
|
cpu: "500m"
|
|
memory: 1Gi
|
|
|
|
# -- Health Probes --
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 5
|
|
successThreshold: 1
|
|
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 5
|
|
successThreshold: 1
|
|
|
|
# -- HPA (disabled - using KEDA) --
|
|
autoscaling:
|
|
enabled: false
|
|
|
|
# -- Scheduling --
|
|
nodeSelector:
|
|
cloud.google.com/compute-class: preprod-cost-optimized
|
|
|
|
tolerations:
|
|
- key: cloud.google.com/compute-class
|
|
operator: Equal
|
|
value: preprod-cost-optimized
|
|
effect: NoSchedule
|
|
|
|
affinity: {}
|
|
|
|
# -- Lifecycle & Graceful Shutdown --
|
|
terminationGracePeriodSeconds: 300
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command:
|
|
- /bin/bash
|
|
- "-c"
|
|
- "kill -SIGQUIT; /bin/sleep 120"
|
|
|
|
# -- Bifrost Application Config --
|
|
bifrost:
|
|
appDir: /app/data
|
|
port: 8080
|
|
host: 0.0.0.0
|
|
logLevel: warn
|
|
logStyle: json
|
|
|
|
# Auth configured via Bifrost UI (stored in DB), not in Helm values
|
|
# This avoids blocking /metrics scrape while still protecting the dashboard
|
|
|
|
client:
|
|
dropExcessRequests: false
|
|
initialPoolSize: 300
|
|
allowedOrigins:
|
|
- "*"
|
|
enableLogging: true
|
|
disableContentLogging: false
|
|
disableDbPingsInHealth: false
|
|
logRetentionDays: 365
|
|
enforceGovernanceHeader: false
|
|
allowDirectKeys: false
|
|
maxRequestBodySizeMb: 100
|
|
enableLitellmFallbacks: false
|
|
|
|
# Configure providers with env.VAR_NAME references for API keys
|
|
# providers:
|
|
# openai:
|
|
# - keys:
|
|
# - value: "env.OPENAI_API_KEY"
|
|
# models: ["gpt-4o", "gpt-4o-mini"]
|
|
# weight: 1.0
|
|
|
|
# -- Storage (External PostgreSQL) --
|
|
storage:
|
|
mode: postgres
|
|
configStore:
|
|
enabled: true
|
|
logsStore:
|
|
enabled: true
|
|
|
|
postgresql:
|
|
enabled: false
|
|
external:
|
|
enabled: true
|
|
host: "10.224.128.143"
|
|
port: 5432
|
|
user: "ai-gateway"
|
|
database: "bifrost_db_4_7"
|
|
sslMode: "disable"
|
|
existingSecret: "int-ai-gateway-vault"
|
|
passwordKey: "BIFROST_ai_gateway"
|
|
|
|
# -- Vector Store (disabled) --
|
|
vectorStore:
|
|
enabled: false
|
|
type: none
|
|
|
|
# -- Meesho Standard Env Vars --
|
|
env:
|
|
- name: TZ
|
|
value: "Asia/Kolkata"
|
|
- name: TELEGRAF_UDP_HOST
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
- name: NODE_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
|
|
# --- Meesho Infrastructure Extensions ---
|
|
|
|
# -- PodDisruptionBudget --
|
|
podDisruptionBudget:
|
|
enabled: true
|
|
maxUnavailable: "10%"
|
|
|
|
# -- ExternalSecret (Vault) --
|
|
# Creates K8s Secret "int-ai-gateway-vault" from Vault path
|
|
# This secret is referenced by postgresql.external.existingSecret above
|
|
externalSecret:
|
|
enabled: true
|
|
secretName: "int-ai-gateway-vault"
|
|
path: "int/cntr/devop/ai-gateway"
|
|
refreshInterval: "0"
|
|
secretStoreRef: "vault-backend"
|
|
|
|
# -- KEDA ScaledObject --
|
|
keda:
|
|
enabled: true
|
|
pollingInterval: 30
|
|
minReplicaCount: 2
|
|
maxReplicaCount: 200
|
|
scaledown:
|
|
stabilizationWindowSeconds: 1800
|
|
selectpolicy: Min
|
|
policies:
|
|
- type: Pods
|
|
value: 2
|
|
periodseconds: 15
|
|
scaleup:
|
|
stabilizationWindowSeconds: 120
|
|
selectpolicy: Max
|
|
policies:
|
|
- type: Pods
|
|
value: 2
|
|
periodseconds: 15
|
|
- type: Percent
|
|
value: 10
|
|
periodseconds: 15
|
|
triggers:
|
|
- type: cpu
|
|
metricType: Utilization
|
|
metadata:
|
|
value: "40"
|