You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
4.5 KiB
139 lines
4.5 KiB
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: csi-phr-base
|
|
namespace: moh-prod
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: csi-phr-base
|
|
tier: backend
|
|
track: stable
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: csi-phr-base
|
|
tier: backend
|
|
track: stable
|
|
spec:
|
|
affinity:
|
|
podAntiAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
- labelSelector:
|
|
matchExpressions:
|
|
- key: app
|
|
operator: In
|
|
values:
|
|
- csi-phr-base
|
|
topologyKey: "kubernetes.io/hostname"
|
|
containers:
|
|
- env:
|
|
- name: configserver
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: config_server
|
|
name: service-configs
|
|
- name: active_profile
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: active_profile
|
|
name: service-config-pharmacy
|
|
- name: SPRING_DATASOURCE_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: pharmacy-db-url
|
|
name: service-config-pharmacy
|
|
- name: SPRING_DATASOURCE_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: pharmacy-db-username
|
|
name: service-pharmacy-secret
|
|
- name: SPRING_DATASOURCE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: pharmacy-db-password
|
|
name: service-pharmacy-secret
|
|
- name: SPRING_DATASOURCE_JPA_DATABASE_PLATFORM
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: pharmacy-db-platform
|
|
name: service-config-pharmacy
|
|
- name: KAFKA_BOOTSTRAP-SERVERS
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: bootstrap-servers
|
|
name: service-config-pharmacy
|
|
- name: ADT-DISCHARGE-START-NOTIFICATION_T
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: discharge-start-notification
|
|
name: service-config-pharmacy
|
|
- name: KAFKA_TOPIC_DISCHARGE-CLEAR-NOTIFICATION
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: discharge-clear-notification
|
|
name: service-config-pharmacy
|
|
- name: KAFKA_TOPIC_DISCHARGE-SUMMARY-CLEAR-NOTIFICATION
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: discharge-summary-clear-notification
|
|
name: service-config-pharmacy
|
|
- name: AUTH_CLIENT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: phrbase-client-id
|
|
name: service-pharmacy-secret
|
|
- name: AUTH_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: phrbase-client-secret
|
|
name: service-pharmacy-secret
|
|
- name: hostname
|
|
value: csi-phr-base
|
|
- name: JAVA_OPTS
|
|
value: -Xms3072m -Xmx3072m # recommended values
|
|
- name: JVM_OPTS
|
|
value: -Xms3072m -Xmx3072m # recommended values
|
|
envFrom:
|
|
- configMapRef:
|
|
name: service-configs
|
|
- secretRef:
|
|
name: service-configs-secret
|
|
image: harbor.moh.gov.sa/vidamoh/csi-phr-base:4.0.31.0-hf17
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/v1.0/actuator/health
|
|
port: http
|
|
initialDelaySeconds: 800
|
|
failureThreshold: 3
|
|
timeoutSeconds: 30
|
|
periodSeconds: 40
|
|
name: csi-phr-base
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/v1.0/actuator/health
|
|
port: http
|
|
initialDelaySeconds: 20
|
|
failureThreshold: 3
|
|
timeoutSeconds: 30
|
|
periodSeconds: 40
|
|
resources:
|
|
limits:
|
|
memory: 4Gi
|
|
cpu: 2000m
|
|
requests:
|
|
cpu: 500m
|
|
memory: 3Gi # to match Xms
|
|
volumeMounts:
|
|
- name: heapdumps-volume
|
|
mountPath: /app/heapdumps
|
|
imagePullSecrets:
|
|
- name: regcred
|
|
volumes:
|
|
- name: heapdumps-volume
|
|
hostPath:
|
|
path: /heapdumps
|
|
type: DirectoryOrCreate |