107 lines
2.9 KiB
YAML
107 lines
2.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ircs-magnet-service
|
|
namespace: ircs-prod
|
|
labels:
|
|
app: ircs-magnet-service
|
|
app.kubernetes.io/part-of: ircs
|
|
environment: prod
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: ircs-magnet-service
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ircs-magnet-service
|
|
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-magnet-service@sha256:88783970566a3f9aa2667fe6001af5f9ccc3882d965f425d715cf4b0f4146bb0
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
envFrom:
|
|
- configMapRef:
|
|
name: ircs-prod-app-config
|
|
env:
|
|
- name: SPRING_APPLICATION_NAME
|
|
value: ircs-magnet-service
|
|
- 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_MAGNET_CACHE_ENABLED
|
|
value: "true"
|
|
- name: APP_MAGNET_CACHE_PROVIDER_TTL
|
|
value: PT5M
|
|
- name: APP_MAGNET_CACHE_APPROVED_LINKS_TTL
|
|
value: PT60S
|
|
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
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ircs-magnet-service
|
|
namespace: ircs-prod
|
|
labels:
|
|
app: ircs-magnet-service
|
|
app.kubernetes.io/part-of: ircs
|
|
environment: prod
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: ircs-magnet-service
|
|
ports:
|
|
- name: http
|
|
port: 8080
|
|
targetPort: http
|
|
|