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.
188 lines
5.7 KiB
188 lines
5.7 KiB
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: api-gateway
|
|
namespace: moh-prod
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: api-gateway
|
|
tier: backend
|
|
track: stable
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: api-gateway
|
|
module: security
|
|
tier: backend
|
|
track: stable
|
|
spec:
|
|
containers:
|
|
- image: harbor.moh.gov.sa/vidamoh/csi-token-filter:4.0.3.0-b2
|
|
imagePullPolicy: IfNotPresent
|
|
name: token-filter
|
|
ports:
|
|
- containerPort: 8085
|
|
name: http
|
|
env:
|
|
- name: GODEBUG
|
|
value: 'gctrace=1,schedtrace=10000'
|
|
# - name: DB_SERVER
|
|
# valueFrom:
|
|
# configMapKeyRef:
|
|
# key: DB_ADDR
|
|
# name: iam-service-configs
|
|
# - name: DB_SERVICE
|
|
# valueFrom:
|
|
# secretKeyRef:
|
|
# key: DB_DATABASE
|
|
# name: iam-service-secret
|
|
# - name: DB_USERNAME
|
|
# valueFrom:
|
|
# secretKeyRef:
|
|
# key: DB_USER
|
|
# name: iam-service-secret
|
|
envFrom:
|
|
- configMapRef:
|
|
name: iam-service-configs
|
|
- secretRef:
|
|
name: iam-service-secret
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz/liveness
|
|
port: 8085
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz/readiness
|
|
port: 8085
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
resources:
|
|
limits:
|
|
memory: 1G
|
|
requests:
|
|
cpu: 50m
|
|
memory: 256M
|
|
- env:
|
|
- name: active_profile
|
|
value: default
|
|
- name: configserver
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: configserver
|
|
name: security-service-configs
|
|
- name: hostname
|
|
value: api-gateway
|
|
- name: EUREKA_CLIENT_SERVICEURL_DEFAULTZONE
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: eureka_server
|
|
name: security-service-configs
|
|
- name: UI_HOSTNAME
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: ui_hostname
|
|
name: security-service-configs
|
|
- name: EUREKA_INSTANCE_PREFER-IP-ADDRESS
|
|
value: "false"
|
|
- name: SPRING_DATASOURCE_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: database-url
|
|
name: security-database-configs
|
|
- name: SPRING_DATASOURCE_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: DB_USER
|
|
name: iam-service-secret
|
|
- name: SPRING_DATASOURCE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: DB_PASSWORD
|
|
name: iam-service-secret
|
|
- name: SPRING_JPA_DATABASE-PLATFORM
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: SPRING_JPA_HIBERNATE_DIALECT
|
|
name: service-configs
|
|
- name: SPRING_DATASOURCE_DRIVER_CLASS_NAME
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: db-driver
|
|
name: service-configs
|
|
- name: HIBERNATE_DIALECT
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: db-dialect
|
|
name: service-configs
|
|
- name: CSI_RECORD_REQUESTS
|
|
value: "false"
|
|
- name: CSI_RECORD-REQUESTS
|
|
value: "false"
|
|
- name: apm_server
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: apm_server
|
|
name: service-configs
|
|
- name: management_health_refresh_enabled
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: management_health_refresh_enabled
|
|
name: service-configs
|
|
- name: CSI_ACCESS_TOKEN_VERIFICATION_ENABLED
|
|
value: "false"
|
|
image: harbor.moh.gov.sa/vidamoh/api-gateway:4.0.2.0 #4.0.0.3-hf1 #1.0.0.0
|
|
imagePullPolicy: IfNotPresent
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- "-c"
|
|
- >-
|
|
curl -X POST http://localhost:9000/actuator/shutdown ; sleep
|
|
5
|
|
livenessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
path: /actuator/health
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 1200
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 10
|
|
name: api-gateway
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
- containerPort: 9000
|
|
name: management
|
|
protocol: TCP
|
|
readinessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
path: /actuator/health
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 10
|
|
resources:
|
|
limits:
|
|
memory: 1500Mi
|
|
requests:
|
|
cpu: 150m
|
|
memory: 750Mi
|
|
volumeMounts:
|
|
- name: configuration
|
|
mountPath: /app/config
|
|
imagePullSecrets:
|
|
- name: regcred
|
|
volumes:
|
|
- name: configuration
|
|
configMap:
|
|
name: api-gateway-configs |