116 lines
No EOL
3.3 KiB
YAML
116 lines
No EOL
3.3 KiB
YAML
apiVersion: serving.knative.dev/v1
|
|
kind: Service
|
|
metadata:
|
|
name: accessible-video-api
|
|
annotations:
|
|
run.googleapis.com/ingress: all
|
|
run.googleapis.com/execution-environment: gen2
|
|
autoscaling.knative.dev/minScale: "1"
|
|
autoscaling.knative.dev/maxScale: "10"
|
|
run.googleapis.com/cpu-throttling: "false"
|
|
spec:
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
autoscaling.knative.dev/maxScale: "10"
|
|
autoscaling.knative.dev/minScale: "1"
|
|
run.googleapis.com/execution-environment: gen2
|
|
run.googleapis.com/cpu-throttling: "false"
|
|
spec:
|
|
containerConcurrency: 100
|
|
timeoutSeconds: 3600
|
|
serviceAccountName: accessible-video-api@PROJECT_ID.iam.gserviceaccount.com
|
|
containers:
|
|
- image: gcr.io/PROJECT_ID/accessible-video-api:latest
|
|
ports:
|
|
- containerPort: 8000
|
|
env:
|
|
- name: APP_ENV
|
|
value: "prod"
|
|
- name: PYTHONPATH
|
|
value: "/app"
|
|
- name: PYTHONUNBUFFERED
|
|
value: "1"
|
|
- name: PYTHONDONTWRITEBYTECODE
|
|
value: "1"
|
|
- name: PORT
|
|
value: "8000"
|
|
- name: MONGODB_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mongodb-url
|
|
key: latest
|
|
- name: REDIS_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: redis-url
|
|
key: latest
|
|
- name: JWT_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: jwt-secret
|
|
key: latest
|
|
- name: JWT_REFRESH_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: jwt-refresh-secret
|
|
key: latest
|
|
- name: GEMINI_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: gemini-api-key
|
|
key: latest
|
|
- name: SENDGRID_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sendgrid-api-key
|
|
key: latest
|
|
- name: ELEVENLABS_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: elevenlabs-api-key
|
|
key: latest
|
|
- name: GCS_BUCKET_NAME
|
|
value: "accessible-video-storage"
|
|
- name: GOOGLE_CLOUD_PROJECT
|
|
value: "PROJECT_ID"
|
|
# OpenTelemetry configuration
|
|
- name: OTEL_SERVICE_NAME
|
|
value: "accessible-video-api"
|
|
- name: OTEL_SERVICE_VERSION
|
|
value: "1.0.0"
|
|
- name: OTEL_TRACES_EXPORTER
|
|
value: "gcp_trace"
|
|
- name: OTEL_METRICS_EXPORTER
|
|
value: "prometheus"
|
|
- name: OTEL_LOGS_EXPORTER
|
|
value: "none"
|
|
# Sentry configuration
|
|
- name: SENTRY_DSN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sentry-dsn
|
|
key: latest
|
|
- name: SENTRY_ENVIRONMENT
|
|
value: "production"
|
|
resources:
|
|
limits:
|
|
memory: "2Gi"
|
|
cpu: "2000m"
|
|
requests:
|
|
memory: "1Gi"
|
|
cpu: "1000m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 60
|
|
timeoutSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5 |