- Updated all OpenTelemetry packages to latest versions: - opentelemetry-api: 1.27.0 → 1.39.1 - opentelemetry-sdk: 1.27.0 → 1.39.1 - opentelemetry-exporter-otlp-proto-grpc: 1.27.0 → 1.39.1 - opentelemetry-exporter-otlp-proto-http: 1.27.0 → 1.39.1 - opentelemetry-instrumentation-fastapi: 0.48b0 → 0.60b1 - opentelemetry-instrumentation-httpx: 0.48b0 → 0.60b1 - opentelemetry-instrumentation-redis: 0.48b0 → 0.60b1 - opentelemetry-instrumentation-sqlalchemy: 0.48b0 → 0.60b1 - Removed prometheus-client==0.23.1 from all services - Unified all services to use the same monitoring package versions Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
132 lines
3.3 KiB
YAML
132 lines
3.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: distribution-service
|
|
labels:
|
|
app: distribution-service
|
|
tier: backend
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: distribution-service
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: distribution-service
|
|
tier: backend
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: dockerhub-creds
|
|
containers:
|
|
- name: distribution-service
|
|
image: bakery/distribution-service:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8000
|
|
name: http
|
|
env:
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: database-secret
|
|
key: url
|
|
- name: REDIS_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: redis-secret
|
|
key: url
|
|
- name: RABBITMQ_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: rabbitmq-secret
|
|
key: url
|
|
- name: JWT_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: auth-secret
|
|
key: jwt-secret
|
|
- name: ENVIRONMENT
|
|
value: "production"
|
|
- name: LOG_LEVEL
|
|
value: "INFO"
|
|
- name: DB_POOL_SIZE
|
|
value: "10"
|
|
- name: DB_MAX_OVERFLOW
|
|
value: "20"
|
|
- name: REDIS_MAX_CONNECTIONS
|
|
value: "50"
|
|
- name: HTTP_TIMEOUT
|
|
value: "30"
|
|
- name: HTTP_RETRIES
|
|
value: "3"
|
|
# OpenTelemetry Configuration
|
|
- name: OTEL_COLLECTOR_ENDPOINT
|
|
value: "http://signoz-otel-collector.signoz.svc.cluster.local:4318"
|
|
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
|
value: "http://signoz-otel-collector.signoz.svc.cluster.local:4318"
|
|
- name: OTEL_SERVICE_NAME
|
|
value: "distribution-service"
|
|
- name: ENABLE_TRACING
|
|
value: "true"
|
|
# Logging Configuration
|
|
- name: OTEL_LOGS_EXPORTER
|
|
value: "otlp"
|
|
- name: OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED
|
|
value: "true"
|
|
# Metrics Configuration
|
|
- name: ENABLE_OTEL_METRICS
|
|
value: "true"
|
|
- name: ENABLE_SYSTEM_METRICS
|
|
value: "true"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8000
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
resources:
|
|
requests:
|
|
memory: "256Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
fsGroup: 2000
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: distribution-service
|
|
labels:
|
|
app: distribution-service
|
|
tier: backend
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: distribution-service
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8000
|
|
targetPort: 8000
|
|
name: http
|
|
type: ClusterIP
|