Files
ircs-prod-config/ircs-prod/core/manifests/aggregation-worker.yaml
T
2026-06-14 11:46:13 +08:00

103 lines
3.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: ircs-aggregation-worker
namespace: ircs-prod
labels:
app: ircs-aggregation-worker
app.kubernetes.io/part-of: ircs
environment: prod
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: ircs-aggregation-worker
template:
metadata:
labels:
app: ircs-aggregation-worker
app.kubernetes.io/part-of: ircs
environment: prod
annotations:
ircs.prodigalgal.com/no-public-route: "true"
spec:
imagePullSecrets:
- name: harbor-secret
containers:
- name: app
image: harbor.mnnu.eu.org/ircs/ircs-aggregation-worker@sha256:154db2f8da961cb300308f7d06337edc0ab11a3784a3fa432d23bf9cb2460e87
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
envFrom:
- configMapRef:
name: ircs-prod-app-config
env:
- name: SPRING_APPLICATION_NAME
value: ircs-aggregation-worker
- name: SPRING_RABBITMQ_HOST
valueFrom:
configMapKeyRef:
name: ircs-prod-app-config
key: RABBITMQ_HOST
- name: SPRING_RABBITMQ_USERNAME
value: admin
- name: SPRING_RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
name: ircs-prod-secrets
key: RABBITMQ_PASSWORD
- name: SPRING_DATASOURCE_URL
valueFrom:
configMapKeyRef:
name: ircs-prod-app-config
key: DB_URL
- name: SPRING_DATASOURCE_USERNAME
value: postgres
- name: SPRING_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
name: ircs-prod-secrets
key: DB_PASSWORD
- name: SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE
value: "2"
- name: SPRING_DATASOURCE_HIKARI_MINIMUM_IDLE
value: "0"
- name: SPRING_DATASOURCE_HIKARI_IDLE_TIMEOUT
value: "30000"
- name: APP_AGGREGATION_SCHEDULER_ENABLED
value: "false"
- name: APP_AGGREGATION_BATCH_SIZE
value: "1"
- name: APP_AGGREGATION_CONFIG_LISTENER_ENABLED
value: "true"
- name: APP_AGGREGATION_SCHEDULER_FIXED_DELAY_MS
value: "5000"
startupProbe:
httpGet:
path: /actuator/health/liveness
port: http
failureThreshold: 30
periodSeconds: 5
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: http
periodSeconds: 10
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: http
periodSeconds: 30
resources:
requests:
cpu: 25m
memory: 128Mi
limits:
cpu: 250m
memory: 512Mi