feat: Add carrier connector Kubernetes deployment and integrate charging engine with packet gateway

- Add CHARGING_ENGINE_URL environment variable to packet-gateway deployment (http://charging-engine-service:3001)
- Add carrier-connector Deployment with 2 replicas, telecom/carrier-connector:latest image
- Add carrier-connector container with port 8080, DATABASE_DSN and ES2_URL from ConfigMap
- Add Prometheus scraping annotations (/metrics on port 8080)
- Add resource limits (256Mi memory, 200m CPU)
This commit is contained in:
nutcas3
2026-04-25 05:34:36 +03:00
parent 8a63cab829
commit f008e98e92
@@ -242,6 +242,8 @@ spec:
env:
- name: REDIS_URL
value: "redis://redis-service:6379"
- name: CHARGING_ENGINE_URL
value: "http://charging-engine-service:3001"
- name: INTERFACE
value: "eth0"
- name: LOG_LEVEL
@@ -353,3 +355,83 @@ spec:
port: 3000
targetPort: 3000
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: carrier-connector
namespace: telecom-platform
labels:
app: carrier-connector
component: backend
spec:
replicas: 2
selector:
matchLabels:
app: carrier-connector
template:
metadata:
labels:
app: carrier-connector
component: backend
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"
spec:
containers:
- name: carrier-connector
image: telecom/carrier-connector:latest
ports:
- containerPort: 8080
name: http
env:
- name: PORT
value: "8080"
- name: DATABASE_DSN
valueFrom:
configMapKeyRef:
name: telecom-config
key: DATABASE_DSN
- name: ES2_URL
valueFrom:
configMapKeyRef:
name: telecom-config
key: ES2_URL
- name: LOG_LEVEL
value: "info"
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "200m"
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /health/ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: carrier-connector-service
namespace: telecom-platform
labels:
app: carrier-connector
spec:
selector:
app: carrier-connector
ports:
- name: http
port: 8080
targetPort: 8080
type: ClusterIP