added repo
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# Configuration: External PostgreSQL (not deployed by Helm)
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/external-postgres.yaml
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: postgres
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# Use external PostgreSQL
|
||||
postgresql:
|
||||
enabled: false
|
||||
external:
|
||||
enabled: true
|
||||
host: "your-postgres-host.example.com"
|
||||
port: 5432
|
||||
user: bifrost
|
||||
password: "your-secure-password"
|
||||
database: bifrost
|
||||
sslMode: require
|
||||
|
||||
# No vector store
|
||||
vectorStore:
|
||||
enabled: false
|
||||
type: none
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
encryptionKey: "your-encryption-key-here"
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# Configuration: SQLite for config store + PostgreSQL for logs store
|
||||
# This demonstrates independent backend selection for each store
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/mixed-backend.yaml
|
||||
|
||||
# Storage configuration with mixed backends
|
||||
storage:
|
||||
mode: sqlite # Default fallback (not used when per-store type is set)
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 5Gi
|
||||
configStore:
|
||||
enabled: true
|
||||
type: sqlite # Config store uses SQLite (fast, local, simple)
|
||||
logsStore:
|
||||
enabled: true
|
||||
type: postgres # Logs store uses PostgreSQL (scalable, queryable)
|
||||
|
||||
# Deploy PostgreSQL for logs store
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: bifrost
|
||||
password: bifrost_password
|
||||
database: bifrost
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
|
||||
# No vector store
|
||||
vectorStore:
|
||||
enabled: false
|
||||
type: none
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
# openai:
|
||||
# keys:
|
||||
# - value: "sk-..."
|
||||
# weight: 1
|
||||
@@ -0,0 +1,46 @@
|
||||
# Configuration: PostgreSQL for config and logs store
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/postgres-only.yaml
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: postgres
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# Deploy PostgreSQL
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: bifrost
|
||||
password: bifrost_password
|
||||
database: bifrost
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
|
||||
# No vector store
|
||||
vectorStore:
|
||||
enabled: false
|
||||
type: none
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
# openai:
|
||||
# keys:
|
||||
# - value: "sk-..."
|
||||
# weight: 1
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
# Configuration: PostgreSQL for config/logs + Qdrant for vector store
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/postgres-qdrant.yaml
|
||||
#
|
||||
# SECURITY NOTE: This example contains placeholder values that MUST be replaced
|
||||
# before deployment. Specifically:
|
||||
# - PostgreSQL password must be set to a strong, randomly generated value
|
||||
# - Provider API keys must be replaced with real keys
|
||||
# See inline comments for specific requirements.
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: postgres
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# PostgreSQL configuration
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: bifrost
|
||||
# REQUIRED: Replace with a strong, randomly generated password
|
||||
# Example: Use `openssl rand -base64 32` to generate a secure password
|
||||
# Or set via Helm: --set postgresql.auth.password="$(openssl rand -base64 32)"
|
||||
password: "REPLACE_ME_WITH_STRONG_PASSWORD"
|
||||
database: bifrost
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 20Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
||||
# Deploy Qdrant for vector store
|
||||
vectorStore:
|
||||
enabled: true
|
||||
type: qdrant
|
||||
qdrant:
|
||||
enabled: true
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
|
||||
# Enable semantic cache plugin to use Qdrant vector store
|
||||
plugins:
|
||||
semanticCache:
|
||||
enabled: true
|
||||
# OPTION 1 (Recommended): Reference to external Kubernetes Secret for OpenAI API key
|
||||
# Create the secret with: kubectl create secret generic bifrost-semantic-cache --from-literal=openai-key=sk-YOUR_OPENAI_KEY
|
||||
secretRef:
|
||||
name: "bifrost-semantic-cache"
|
||||
key: "openai-key"
|
||||
# OPTION 2 (Not recommended): Or uncomment to provide keys directly (not secure)
|
||||
# Remove secretRef above and uncomment the keys below:
|
||||
config:
|
||||
provider: "openai"
|
||||
# keys:
|
||||
# - "REPLACE_WITH_OPENAI_API_KEY" # Not recommended: use secretRef instead
|
||||
embedding_model: "text-embedding-3-small"
|
||||
dimension: 1536
|
||||
threshold: 0.8
|
||||
ttl: "5m"
|
||||
@@ -0,0 +1,75 @@
|
||||
# Configuration: PostgreSQL for config/logs + Redis for vector store
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/postgres-redis.yaml
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: postgres
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# Deploy PostgreSQL
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: bifrost
|
||||
password: bifrost_password
|
||||
database: bifrost
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
|
||||
# Deploy Redis for vector store
|
||||
vectorStore:
|
||||
enabled: true
|
||||
type: redis
|
||||
redis:
|
||||
enabled: true
|
||||
auth:
|
||||
enabled: true
|
||||
password: "redis_password"
|
||||
master:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 8Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
|
||||
# Enable semantic cache plugin to use Redis vector store
|
||||
plugins:
|
||||
semanticCache:
|
||||
enabled: true
|
||||
# Reference to external Kubernetes Secret for OpenAI API key
|
||||
# Create the secret with: kubectl create secret generic bifrost-semantic-cache --from-literal=openai-key=sk-YOUR_OPENAI_KEY
|
||||
secretRef:
|
||||
name: "bifrost-semantic-cache"
|
||||
key: "openai-key"
|
||||
config:
|
||||
provider: "openai"
|
||||
# keys are injected from the secret via environment variable
|
||||
embedding_model: "text-embedding-3-small"
|
||||
dimension: 1536
|
||||
threshold: 0.8
|
||||
ttl: "5m"
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
# Configuration: PostgreSQL for config/logs + Weaviate for vector store
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/postgres-weaviate.yaml
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: postgres
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# Deploy PostgreSQL
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: bifrost
|
||||
password: bifrost_password
|
||||
database: bifrost
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
|
||||
# Deploy Weaviate for vector store
|
||||
vectorStore:
|
||||
enabled: true
|
||||
type: weaviate
|
||||
weaviate:
|
||||
enabled: true
|
||||
replicas: 1
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
|
||||
# Enable semantic cache plugin to use vector store
|
||||
plugins:
|
||||
semanticCache:
|
||||
enabled: true
|
||||
# Reference to external Kubernetes Secret for OpenAI API key
|
||||
# Create the secret with: kubectl create secret generic bifrost-semantic-cache --from-literal=openai-key=sk-YOUR_OPENAI_KEY
|
||||
secretRef:
|
||||
name: "bifrost-semantic-cache"
|
||||
key: "openai-key"
|
||||
config:
|
||||
provider: "openai"
|
||||
# keys are injected from the secret via environment variable
|
||||
embedding_model: "text-embedding-3-small"
|
||||
dimension: 1536
|
||||
threshold: 0.8
|
||||
ttl: "5m"
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
# Configuration: Production High-Availability Setup
|
||||
# PostgreSQL + Weaviate + Auto-scaling + Ingress
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/production-ha.yaml
|
||||
|
||||
# Multiple replicas for HA
|
||||
replicaCount: 3
|
||||
|
||||
# Auto-scaling configuration
|
||||
autoscaling:
|
||||
enabled: true
|
||||
minReplicas: 3
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 70
|
||||
targetMemoryUtilizationPercentage: 80
|
||||
|
||||
# Ingress configuration
|
||||
ingress:
|
||||
enabled: true
|
||||
className: "nginx"
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
hosts:
|
||||
- host: bifrost.yourdomain.com
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: bifrost-tls
|
||||
hosts:
|
||||
- bifrost.yourdomain.com
|
||||
|
||||
# Resource limits for production
|
||||
resources:
|
||||
limits:
|
||||
cpu: 4000m
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: postgres
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# PostgreSQL with higher resources
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: bifrost
|
||||
password: "CHANGE_ME_SECURE_PASSWORD"
|
||||
database: bifrost
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 50Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
|
||||
# Weaviate for semantic caching
|
||||
vectorStore:
|
||||
enabled: true
|
||||
type: weaviate
|
||||
weaviate:
|
||||
enabled: true
|
||||
replicas: 2
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 50Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
|
||||
# Bifrost production configuration
|
||||
bifrost:
|
||||
# Reference to external Kubernetes Secret for encryption key
|
||||
# Create the secret with: kubectl create secret generic bifrost-encryption --from-literal=key=YOUR_ENCRYPTION_KEY
|
||||
encryptionKeySecret:
|
||||
name: "bifrost-encryption"
|
||||
key: "key"
|
||||
|
||||
client:
|
||||
initialPoolSize: 1000
|
||||
allowedOrigins:
|
||||
- "https://yourdomain.com"
|
||||
- "https://app.yourdomain.com"
|
||||
enableLogging: true
|
||||
maxRequestBodySizeMb: 100
|
||||
|
||||
providers: {}
|
||||
# Add your production provider keys here
|
||||
|
||||
plugins:
|
||||
telemetry:
|
||||
enabled: true
|
||||
config: {}
|
||||
|
||||
logging:
|
||||
enabled: true
|
||||
config: {}
|
||||
|
||||
semanticCache:
|
||||
enabled: true
|
||||
# Reference to external Kubernetes Secret for OpenAI API key
|
||||
# Create the secret with: kubectl create secret generic bifrost-semantic-cache --from-literal=openai-key=sk-YOUR_OPENAI_KEY
|
||||
secretRef:
|
||||
name: "bifrost-semantic-cache"
|
||||
key: "openai-key"
|
||||
config:
|
||||
provider: "openai"
|
||||
# keys are injected from the secret via environment variable
|
||||
embedding_model: "text-embedding-3-small"
|
||||
dimension: 1536
|
||||
threshold: 0.85
|
||||
ttl: "1h"
|
||||
conversation_history_threshold: 5
|
||||
|
||||
# Pod affinity for better distribution
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/name
|
||||
operator: In
|
||||
values:
|
||||
- bifrost
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
# Configuration: Multiple Providers with API Keys and Virtual Keys
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/providers-and-virtual-keys.yaml
|
||||
#
|
||||
# This example demonstrates:
|
||||
# - Multiple providers (OpenAI, Anthropic, Groq) with 2-3 API keys each
|
||||
# - Virtual keys with provider restrictions
|
||||
# - Budgets and rate limits for governance
|
||||
#
|
||||
# Note: API keys in this example are dummy values for demonstration purposes.
|
||||
# Replace with real keys in production.
|
||||
|
||||
# Image configuration
|
||||
image:
|
||||
repository: docker.io/maximhq/bifrost
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "v1.3.55"
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
# Service
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
|
||||
# Storage configuration - using SQLite for simplicity
|
||||
storage:
|
||||
mode: sqlite
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 5Gi
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# No PostgreSQL needed for this example
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
# No vector store for this example
|
||||
vectorStore:
|
||||
enabled: false
|
||||
type: none
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
appDir: /app/data
|
||||
port: 8080
|
||||
host: 0.0.0.0
|
||||
logLevel: info
|
||||
logStyle: json
|
||||
|
||||
client:
|
||||
dropExcessRequests: false
|
||||
initialPoolSize: 100
|
||||
allowedOrigins:
|
||||
- "*"
|
||||
enableLogging: true
|
||||
enforceGovernanceHeader: false
|
||||
allowDirectKeys: false
|
||||
maxRequestBodySizeMb: 100
|
||||
|
||||
# ==========================================================================
|
||||
# PROVIDERS CONFIGURATION
|
||||
# ==========================================================================
|
||||
# Configure multiple providers with 2-3 API keys each.
|
||||
# Keys have weights for load balancing - higher weight = more traffic.
|
||||
# Replace dummy values with real API keys in production.
|
||||
|
||||
providers:
|
||||
# OpenAI - 3 API keys with different weights
|
||||
openai:
|
||||
keys:
|
||||
- name: "openai-primary"
|
||||
value: "sk-dummy-openai-key-1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
weight: 2 # Gets 50% of traffic (2 out of 4 total weight)
|
||||
models:
|
||||
- name: "openai-secondary"
|
||||
value: "sk-dummy-openai-key-2-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
weight: 1 # Gets 25% of traffic
|
||||
models:
|
||||
- name: "openai-backup"
|
||||
value: "sk-dummy-openai-key-3-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
weight: 1 # Gets 25% of traffic
|
||||
models:
|
||||
|
||||
# Anthropic - 2 API keys
|
||||
anthropic:
|
||||
keys:
|
||||
- name: "anthropic-primary"
|
||||
value: "sk-ant-dummy-key-1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
weight: 1
|
||||
models:
|
||||
- name: "anthropic-secondary"
|
||||
value: "sk-ant-dummy-key-2-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
weight: 1
|
||||
models:
|
||||
|
||||
# Groq - 2 API keys
|
||||
groq:
|
||||
keys:
|
||||
- name: "groq-primary"
|
||||
value: "gsk_dummy_groq_key_1_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
weight: 1
|
||||
models:
|
||||
- name: "groq-secondary"
|
||||
value: "gsk_dummy_groq_key_2_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
weight: 1
|
||||
models:
|
||||
|
||||
# ==========================================================================
|
||||
# GOVERNANCE CONFIGURATION
|
||||
# ==========================================================================
|
||||
# Configure budgets, rate limits, and virtual keys for access control
|
||||
|
||||
governance:
|
||||
# Budget configurations - limit spending per period
|
||||
budgets:
|
||||
- id: "budget-dev"
|
||||
max_limit: 50 # $50 limit
|
||||
reset_duration: "1M" # Resets monthly
|
||||
- id: "budget-production"
|
||||
max_limit: 500 # $500 limit
|
||||
reset_duration: "1M"
|
||||
- id: "budget-testing"
|
||||
max_limit: 10 # $10 limit
|
||||
reset_duration: "1d" # Resets daily
|
||||
|
||||
# Rate limit configurations - limit requests/tokens per period
|
||||
rateLimits:
|
||||
- id: "rate-limit-standard"
|
||||
token_max_limit: 100000
|
||||
token_reset_duration: "1h"
|
||||
request_max_limit: 1000
|
||||
request_reset_duration: "1h"
|
||||
- id: "rate-limit-high"
|
||||
token_max_limit: 500000
|
||||
token_reset_duration: "1h"
|
||||
request_max_limit: 5000
|
||||
request_reset_duration: "1h"
|
||||
- id: "rate-limit-testing"
|
||||
token_max_limit: 10000
|
||||
token_reset_duration: "1h"
|
||||
request_max_limit: 100
|
||||
request_reset_duration: "1h"
|
||||
|
||||
# Virtual Keys - access tokens for different use cases
|
||||
virtualKeys:
|
||||
# Development virtual key - access to ALL providers (no restrictions)
|
||||
- id: "vk-development"
|
||||
name: "Development Key"
|
||||
value: "vk-dev-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
is_active: true
|
||||
budget_id: "budget-dev"
|
||||
rate_limit_id: "rate-limit-standard"
|
||||
# No provider_configs means all providers are accessible
|
||||
|
||||
# OpenAI-only virtual key - restricted to OpenAI provider with specific keys
|
||||
- id: "vk-openai-only"
|
||||
name: "OpenAI Only Key"
|
||||
value: "vk-openai-yyyyyyyyyyyyyyyyyyyyyyyyyyyy"
|
||||
is_active: true
|
||||
budget_id: "budget-production"
|
||||
rate_limit_id: "rate-limit-high"
|
||||
provider_configs:
|
||||
- provider: "openai"
|
||||
weight: 1
|
||||
# Restrict to primary and secondary keys only (exclude backup)
|
||||
keys:
|
||||
- name: "openai-primary"
|
||||
- name: "openai-secondary"
|
||||
|
||||
# Anthropic + Groq virtual key - access to both providers with key restrictions
|
||||
- id: "vk-anthropic-groq"
|
||||
name: "Anthropic and Groq Key"
|
||||
value: "vk-anthgroq-zzzzzzzzzzzzzzzzzzzzzzzzzz"
|
||||
is_active: true
|
||||
budget_id: "budget-production"
|
||||
rate_limit_id: "rate-limit-high"
|
||||
provider_configs:
|
||||
- provider: "anthropic"
|
||||
weight: 1
|
||||
# Only use primary anthropic key
|
||||
keys:
|
||||
- name: "anthropic-primary"
|
||||
- provider: "groq"
|
||||
weight: 1
|
||||
# Use both groq keys
|
||||
keys:
|
||||
- name: "groq-primary"
|
||||
- name: "groq-secondary"
|
||||
|
||||
# Testing virtual key - limited budget and rate for testing
|
||||
- id: "vk-testing"
|
||||
name: "Testing Key"
|
||||
value: "vk-test-tttttttttttttttttttttttttttt"
|
||||
is_active: true
|
||||
budget_id: "budget-testing"
|
||||
rate_limit_id: "rate-limit-testing"
|
||||
provider_configs:
|
||||
- provider: "openai"
|
||||
weight: 1
|
||||
allowed_models:
|
||||
- "gpt-4o-mini" # Only allow the cheaper model for testing
|
||||
# Use only the backup key for testing purposes
|
||||
keys:
|
||||
- name: "openai-backup"
|
||||
|
||||
# Plugins configuration
|
||||
plugins:
|
||||
telemetry:
|
||||
enabled: false
|
||||
logging:
|
||||
enabled: true
|
||||
config: {}
|
||||
governance:
|
||||
enabled: true
|
||||
config:
|
||||
is_vk_mandatory: false # Set to true to require virtual key on all requests
|
||||
|
||||
# Resource limits
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
|
||||
# Probes
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
@@ -0,0 +1,106 @@
|
||||
# Configuration: Using Kubernetes Secrets for All Sensitive Values
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/secrets-from-k8s.yaml
|
||||
#
|
||||
# This example demonstrates how to use existing Kubernetes secrets for all
|
||||
# sensitive values instead of putting them directly in the values file.
|
||||
#
|
||||
# Prerequisites:
|
||||
# 1. Create the required Kubernetes secrets before installing the chart:
|
||||
#
|
||||
# # PostgreSQL password secret
|
||||
# kubectl create secret generic postgres-credentials \
|
||||
# --from-literal=password='your-postgres-password'
|
||||
#
|
||||
# # Encryption key secret
|
||||
# kubectl create secret generic bifrost-encryption \
|
||||
# --from-literal=key='your-encryption-key'
|
||||
#
|
||||
# # Provider API keys secret
|
||||
# kubectl create secret generic provider-api-keys \
|
||||
# --from-literal=openai-api-key='sk-...' \
|
||||
# --from-literal=anthropic-api-key='sk-ant-...'
|
||||
#
|
||||
# # Qdrant API key secret (if using Qdrant)
|
||||
# kubectl create secret generic qdrant-credentials \
|
||||
# --from-literal=api-key='your-qdrant-api-key'
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: postgres
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# External PostgreSQL with credentials from Kubernetes secret
|
||||
postgresql:
|
||||
enabled: false
|
||||
external:
|
||||
enabled: true
|
||||
host: "your-postgres-host.example.com"
|
||||
port: 5432
|
||||
user: bifrost
|
||||
database: bifrost
|
||||
sslMode: require
|
||||
# Reference existing Kubernetes secret for password
|
||||
existingSecret: "postgres-credentials"
|
||||
passwordKey: "password"
|
||||
|
||||
# Vector store with API key from Kubernetes secret
|
||||
vectorStore:
|
||||
enabled: true
|
||||
type: qdrant
|
||||
qdrant:
|
||||
enabled: false
|
||||
external:
|
||||
enabled: true
|
||||
host: "your-qdrant-host.example.com"
|
||||
port: 6334
|
||||
useTls: true
|
||||
# Reference existing Kubernetes secret for API key
|
||||
existingSecret: "qdrant-credentials"
|
||||
apiKeyKey: "api-key"
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
# Encryption key from Kubernetes secret
|
||||
encryptionKeySecret:
|
||||
name: "bifrost-encryption"
|
||||
key: "key"
|
||||
|
||||
client:
|
||||
enableLogging: true
|
||||
|
||||
# Provider configurations using env.VAR_NAME syntax
|
||||
# The actual values come from providerSecrets below
|
||||
providers:
|
||||
openai:
|
||||
keys:
|
||||
- value: "env.OPENAI_API_KEY"
|
||||
weight: 1
|
||||
anthropic:
|
||||
keys:
|
||||
- value: "env.ANTHROPIC_API_KEY"
|
||||
weight: 1
|
||||
|
||||
# Provider secrets - inject API keys from Kubernetes secrets as env vars
|
||||
providerSecrets:
|
||||
openai:
|
||||
existingSecret: "provider-api-keys"
|
||||
key: "openai-api-key"
|
||||
envVar: "OPENAI_API_KEY"
|
||||
anthropic:
|
||||
existingSecret: "provider-api-keys"
|
||||
key: "anthropic-api-key"
|
||||
envVar: "ANTHROPIC_API_KEY"
|
||||
|
||||
plugins:
|
||||
# Maxim plugin with API key from secret
|
||||
maxim:
|
||||
enabled: false # Set to true if using Maxim
|
||||
config:
|
||||
log_repo_id: "your-log-repo-id"
|
||||
secretRef:
|
||||
name: "maxim-credentials"
|
||||
key: "api-key"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Example Kubernetes Secret for Semantic Cache API Key
|
||||
# This secret is referenced by production-ha.yaml
|
||||
#
|
||||
# IMPORTANT: Do not commit this file with real API keys to version control!
|
||||
#
|
||||
# Usage:
|
||||
# 1. Replace 'YOUR_OPENAI_API_KEY' with your actual OpenAI API key
|
||||
# 2. Apply the secret: kubectl apply -f semantic-cache-secret-example.yaml -n <namespace>
|
||||
# 3. Deploy Bifrost with: helm install bifrost . -f values-examples/production-ha.yaml -n <namespace>
|
||||
#
|
||||
# Alternative: Create the secret using kubectl command:
|
||||
# kubectl create secret generic bifrost-semantic-cache \
|
||||
# --from-literal=openai-key=sk-YOUR_OPENAI_API_KEY \
|
||||
# -n <namespace>
|
||||
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: bifrost-semantic-cache
|
||||
namespace: default # Change this to your target namespace
|
||||
labels:
|
||||
app.kubernetes.io/name: bifrost
|
||||
app.kubernetes.io/component: semantic-cache
|
||||
type: Opaque
|
||||
stringData:
|
||||
# Replace with your actual OpenAI API key
|
||||
openai-key: "sk-YOUR_OPENAI_API_KEY"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Configuration: SQLite for config and logs store
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/sqlite-only.yaml
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: sqlite
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# No PostgreSQL
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
# No vector store
|
||||
vectorStore:
|
||||
enabled: false
|
||||
type: none
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
# openai:
|
||||
# keys:
|
||||
# - value: "sk-..."
|
||||
# weight: 1
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# Configuration: SQLite for config/logs + Qdrant for vector store
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/sqlite-qdrant.yaml
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: sqlite
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# No PostgreSQL
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
# Deploy Qdrant for vector store
|
||||
vectorStore:
|
||||
enabled: true
|
||||
type: qdrant
|
||||
qdrant:
|
||||
enabled: true
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
|
||||
# Enable semantic cache plugin to use vector store
|
||||
plugins:
|
||||
semanticCache:
|
||||
enabled: true
|
||||
# Reference to external Kubernetes Secret for OpenAI API key
|
||||
# Create the secret with: kubectl create secret generic bifrost-semantic-cache --from-literal=openai-key=sk-YOUR_OPENAI_KEY
|
||||
secretRef:
|
||||
name: "bifrost-semantic-cache"
|
||||
key: "openai-key"
|
||||
config:
|
||||
provider: "openai"
|
||||
# keys are injected from the secret via environment variable
|
||||
embedding_model: "text-embedding-3-small"
|
||||
dimension: 1536
|
||||
threshold: 0.8
|
||||
ttl: "5m"
|
||||
@@ -0,0 +1,76 @@
|
||||
# Configuration: SQLite for config/logs + Redis for vector store
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/sqlite-redis.yaml
|
||||
#
|
||||
# SECURITY NOTE: This example contains placeholder values that MUST be replaced
|
||||
# before deployment. Specifically:
|
||||
# - Redis password must be set to a strong, randomly generated value
|
||||
# - Provider API keys must be replaced with real keys
|
||||
# See inline comments for specific requirements.
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: sqlite
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# No PostgreSQL
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
# Deploy Redis for vector store
|
||||
vectorStore:
|
||||
enabled: true
|
||||
type: redis
|
||||
redis:
|
||||
enabled: true
|
||||
auth:
|
||||
enabled: true
|
||||
# REQUIRED: Replace with a strong, randomly generated password
|
||||
# Example: Use `openssl rand -base64 32` to generate a secure password
|
||||
# Or set via Helm: --set vectorStore.redis.auth.password="$(openssl rand -base64 32)"
|
||||
# Or use a Kubernetes secret: --set vectorStore.redis.auth.existingSecret=redis-secret
|
||||
password: "REPLACE_ME_WITH_STRONG_PASSWORD"
|
||||
master:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 8Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
|
||||
# Enable semantic cache plugin to use Redis vector store
|
||||
plugins:
|
||||
semanticCache:
|
||||
enabled: true
|
||||
# OPTION 1 (Recommended): Reference to external Kubernetes Secret for OpenAI API key
|
||||
# Create the secret with: kubectl create secret generic bifrost-semantic-cache --from-literal=openai-key=sk-YOUR_OPENAI_KEY
|
||||
secretRef:
|
||||
name: "bifrost-semantic-cache"
|
||||
key: "openai-key"
|
||||
# OPTION 2 (Not recommended): Or uncomment to provide keys directly (not secure)
|
||||
# Remove secretRef above and uncomment the keys below:
|
||||
config:
|
||||
provider: "openai"
|
||||
# keys:
|
||||
# - "REPLACE_WITH_OPENAI_API_KEY" # Not recommended: use secretRef instead
|
||||
embedding_model: "text-embedding-3-small"
|
||||
dimension: 1536
|
||||
threshold: 0.8
|
||||
ttl: "5m"
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# Configuration: SQLite for config/logs + Weaviate for vector store
|
||||
# Usage: helm install bifrost ./bifrost -f values-examples/sqlite-weaviate.yaml
|
||||
|
||||
# Storage configuration
|
||||
storage:
|
||||
mode: sqlite
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
configStore:
|
||||
enabled: true
|
||||
logsStore:
|
||||
enabled: true
|
||||
|
||||
# No PostgreSQL
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
# Deploy Weaviate for vector store
|
||||
vectorStore:
|
||||
enabled: true
|
||||
type: weaviate
|
||||
weaviate:
|
||||
enabled: true
|
||||
replicas: 1
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
||||
# Bifrost configuration
|
||||
bifrost:
|
||||
client:
|
||||
enableLogging: true
|
||||
providers: {}
|
||||
# Add your provider keys here
|
||||
|
||||
# Enable semantic cache plugin to use vector store
|
||||
plugins:
|
||||
semanticCache:
|
||||
enabled: true
|
||||
# Reference to external Kubernetes Secret for OpenAI API key
|
||||
# Create the secret with: kubectl create secret generic bifrost-semantic-cache --from-literal=openai-key=sk-YOUR_OPENAI_KEY
|
||||
secretRef:
|
||||
name: "bifrost-semantic-cache"
|
||||
key: "openai-key"
|
||||
config:
|
||||
provider: "openai"
|
||||
# keys are injected from the secret via environment variable
|
||||
embedding_model: "text-embedding-3-small"
|
||||
dimension: 1536
|
||||
threshold: 0.8
|
||||
ttl: "5m"
|
||||
|
||||
Reference in New Issue
Block a user