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

128 lines
3.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: ircs-normalization-worker
namespace: ircs-prod
labels:
app: ircs-normalization-worker
app.kubernetes.io/part-of: ircs
environment: prod
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: ircs-normalization-worker
template:
metadata:
labels:
app: ircs-normalization-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-normalization-worker@sha256:399ca4e645c20a8fef850499a5b1c4223fc6308ca36598f778641e1efbb8eaf8
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
envFrom:
- configMapRef:
name: ircs-prod-app-config
env:
- name: SPRING_APPLICATION_NAME
value: ircs-normalization-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_NORMALIZATION_LISTENER_ENABLED
value: "true"
- name: APP_NORMALIZATION_CONFIG_LISTENER_ENABLED
value: "true"
- name: APP_NORMALIZATION_INTERNAL_ACCESS_REQUIRE_TOKEN
value: "false"
- name: APP_NORMALIZATION_WATCHDOG_ENABLED
value: "false"
- name: APP_NORMALIZATION_WATCHDOG_BATCH_SIZE
value: "25"
- name: APP_NORMALIZATION_HANLP_PREWARM_ENABLED
value: "true"
startupProbe:
httpGet:
path: /actuator/health/liveness
port: http
failureThreshold: 120
periodSeconds: 5
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: http
periodSeconds: 10
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: http
periodSeconds: 30
timeoutSeconds: 3
resources:
requests:
cpu: 25m
memory: 128Mi
limits:
cpu: 250m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: ircs-normalization-worker
namespace: ircs-prod
labels:
app: ircs-normalization-worker
app.kubernetes.io/part-of: ircs
environment: prod
spec:
type: ClusterIP
selector:
app: ircs-normalization-worker
ports:
- name: http
port: 8080
targetPort: http