log-center/k8s/api-deployment-prod.yaml
zyc 704e9b1a83
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 1m24s
refactor: simplify k8s config by using direct env vars instead of secrets
2026-01-30 11:52:58 +08:00

54 lines
1.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: log-center-api
labels:
app: log-center-api
spec:
replicas: 1
selector:
matchLabels:
app: log-center-api
template:
metadata:
labels:
app: log-center-api
spec:
containers:
- name: log-center-api
image: ${CI_REGISTRY_IMAGE}/log-center-api:latest
imagePullPolicy: Always
ports:
- containerPort: 8002
env:
# PostgreSQL Database
- name: DB_HOST
value: "pgm-7xv4811oj11j86htzo.pg.rds.aliyuncs.com"
- name: DB_PORT
value: "5432"
- name: DB_NAME
value: "log_center"
- name: DB_USER
value: "log_center"
- name: DB_PASSWORD
value: "JogNQdtrd3WY8CBCAiYfYEGx"
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
---
apiVersion: v1
kind: Service
metadata:
name: log-center-api
spec:
selector:
app: log-center-api
ports:
- protocol: TCP
port: 8002
targetPort: 8002