commit 05e2b7375e926482e38980f1ae56e12ae4b2b8c7 Author: Ishrath Ahamed Date: Mon Mar 24 17:36:40 2025 +0530 1 diff --git a/PreSync/dbsync.yaml b/PreSync/dbsync.yaml new file mode 100644 index 0000000..1715e3c --- /dev/null +++ b/PreSync/dbsync.yaml @@ -0,0 +1,59 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: before + namespace: moh-prod + annotations: + argocd.argoproj.io/hook: PreSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: presync-pod + image: harbor.moh.gov.sa/vidamoh/csi-automation-initiator:V1.0.0.230 + imagePullPolicy: IfNotPresent + command: ["/bin/sh", "-c"] + args: ["mkdir kafka && mkdir db-Change && mkdir screenPermissions && mkdir mongoIndex && mkdir featureToggles && mkdir LabelTranslations && mkdir masterData && mkdir BusinessPermissions && git config --global http.sslVerify false && git clone https://$(GITEA_UN):$(GITEA_PW)@git.cloudsolutions.com.sa/Automation/Kafka-topic-automation.git /usr/app/kafka/ && git config --global http.sslVerify false && git clone https://$(GITEA_UN):$(GITEA_PW)@git.cloudsolutions.com.sa/Automation/DB-Change-automation.git /usr/app/db-Change/ && git config --global http.sslVerify false && git clone https://$(GITEA_UN):$(GITEA_PW)@git.cloudsolutions.com.sa/Automation/Screen-permissions.git /usr/app/screenPermissions/ && git config --global http.sslVerify false && git clone https://$(GITEA_UN):$(GITEA_PW)@git.cloudsolutions.com.sa/Automation/MongoDB-indexes.git /usr/app/mongoIndex/ && git config --global http.sslVerify false && git clone https://$(GITEA_UN):$(GITEA_PW)@git.cloudsolutions.com.sa/Automation/Feature-Toggles.git /usr/app/featureToggles/ && git config --global http.sslVerify false && git clone https://$(GITEA_UN):$(GITEA_PW)@git.cloudsolutions.com.sa/Automation/LabelTranslations.git /usr/app/LabelTranslations/ && git config --global http.sslVerify false && git clone https://$(GITEA_UN):$(GITEA_PW)@git.cloudsolutions.com.sa/Automation/masterData.git /usr/app/masterData/ && git config --global http.sslVerify false && git clone https://$(GITEA_UN):$(GITEA_PW)@git.cloudsolutions.com.sa/Automation/Business-Permissions.git /usr/app/BusinessPermissions/ && node index.js && sleep 20"] + resources: + limits: + cpu: 300m + memory: 1Gi + requests: + cpu: 250m + memory: 256Mi + env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: hostname + value: csi-java-ehr-config + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: init-database-configs + - secretRef: + name: init-database-secrets + restartPolicy: Never + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/PreSync/kustomization.yaml b/PreSync/kustomization.yaml new file mode 100644 index 0000000..0b741ac --- /dev/null +++ b/PreSync/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - dbsync.yaml \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/apigateway/api-gateway/Deployment.yaml b/apigateway/api-gateway/Deployment.yaml new file mode 100644 index 0000000..d0ec1fd --- /dev/null +++ b/apigateway/api-gateway/Deployment.yaml @@ -0,0 +1,188 @@ +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 \ No newline at end of file diff --git a/apigateway/api-gateway/hpa.yaml b/apigateway/api-gateway/hpa.yaml new file mode 100644 index 0000000..e0c57b9 --- /dev/null +++ b/apigateway/api-gateway/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: api-gateway + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: api-gateway # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/apigateway/api-gateway/kustomization.yaml b/apigateway/api-gateway/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/apigateway/api-gateway/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/apigateway/api-gateway/post.yaml b/apigateway/api-gateway/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/apigateway/api-gateway/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/apigateway/api-gateway/service.yaml b/apigateway/api-gateway/service.yaml new file mode 100644 index 0000000..752b9c4 --- /dev/null +++ b/apigateway/api-gateway/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: api-gateway + name: api-gateway + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 8085 + selector: + app: api-gateway + type: ClusterIP diff --git a/base/baseutilityservicejava/Deployment.yaml b/base/baseutilityservicejava/Deployment.yaml new file mode 100644 index 0000000..9f9c69c --- /dev/null +++ b/base/baseutilityservicejava/Deployment.yaml @@ -0,0 +1,112 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-base-utility + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-base-utility + tier: backend + track: stable + template: + metadata: + labels: + app: csi-base-utility + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-base-utility + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: baseutil-database-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: db-dialect + name: baseutil-database-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: db-base-utility-url + name: baseutil-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-base-utility-username + name: baseutil-service-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-base-utility-password + name: baseutil-service-secret + - name: hostname + value: csi-java-base-utility + - name: JAVA_OPTS + value: "-Xms512m -Xmx1536m" + - name: JVM_OPTS + value: "-XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=70 -XX:CompressedClassSpaceSize=64m -XX:ReservedCodeCacheSize=64m -XX:MaxMetaspaceSize=256m -Xms512m -Xmx1536m -XX:MaxRAMPercentage=70 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/heapdumps/base-util.hprof" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/base-utility-service-java-sev:4.1.9.0 + imagePullPolicy: IfNotPresent + name: csi-base-utility + ports: + - containerPort: 80 + name: http + livenessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + timeoutSeconds: 10 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 10 + resources: + limits: + memory: 3Gi + requests: + cpu: 200m + memory: 1.5Gi + volumeMounts: + - name: heapdumps-volume + mountPath: /app/heapdumps + imagePullSecrets: + - name: regcred + volumes: + - name: heapdumps-volume + hostPath: + path: /heapdumps + type: DirectoryOrCreate \ No newline at end of file diff --git a/base/baseutilityservicejava/hpa.yaml b/base/baseutilityservicejava/hpa.yaml new file mode 100644 index 0000000..43eefa9 --- /dev/null +++ b/base/baseutilityservicejava/hpa.yaml @@ -0,0 +1,52 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-base-utility + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-base-utility # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" + # triggers: + # - type: cpu/memory + # metricType: Utilizat #Utilization + # metadata: + # value: "75" + + + +# spec: +# scaleTargetRef: +# name: my-deployment +# advanced: # Optional. Section to specify advanced options +# restoreToOriginalReplicaCount: true/false # Optional. Default: false +# horizontalPodAutoscalerConfig: # Optional. Section to specify HPA related options +# behavior: # Optional. Use to modify HPA's scaling behavior +# scaleDown: +# stabilizationWindowSeconds: 300 +# policies: +# - type: Percent +# value: 100 +# periodSeconds: 15 + # triggers: + # - type: resource # provider cpu/memory scaler + # metadata: + # name: cpu/memory + # type: value/ utilization/ averagevalue + # value: 60 # Optional + # averageValue: 40 # Optional + # averageUtilization: 50 # Optional \ No newline at end of file diff --git a/base/baseutilityservicejava/kustomization.yaml b/base/baseutilityservicejava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/base/baseutilityservicejava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/base/baseutilityservicejava/post.yaml b/base/baseutilityservicejava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/base/baseutilityservicejava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/base/baseutilityservicejava/service.yaml b/base/baseutilityservicejava/service.yaml new file mode 100644 index 0000000..c4e1ae4 --- /dev/null +++ b/base/baseutilityservicejava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-base-utility + name: csi-java-base-utility + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-base-utility + type: ClusterIP \ No newline at end of file diff --git a/base/configui/Deployment.yaml b/base/configui/Deployment.yaml new file mode 100644 index 0000000..a1d981b --- /dev/null +++ b/base/configui/Deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-config-ui + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-config-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-config-ui + tier: frontend + track: stable + spec: + containers: + - image: harbor.moh.gov.sa/vidamoh/base-ui:4.0.95.0 + imagePullPolicy: IfNotPresent + name: csi-config-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/base/configui/hpa.yaml b/base/configui/hpa.yaml new file mode 100644 index 0000000..772fac4 --- /dev/null +++ b/base/configui/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: cpu-csi-config-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-config-ui + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 1 + maxReplicaCount: 2 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/base/configui/kustomization.yaml b/base/configui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/base/configui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/base/configui/post.yaml b/base/configui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/base/configui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/base/configui/service.yaml b/base/configui/service.yaml new file mode 100644 index 0000000..e2eb29e --- /dev/null +++ b/base/configui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-config-ui-service + name: csi-config-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-config-ui + type: ClusterIP \ No newline at end of file diff --git a/base/csi-vida-mfe/Deployment.yaml b/base/csi-vida-mfe/Deployment.yaml new file mode 100644 index 0000000..af51189 --- /dev/null +++ b/base/csi-vida-mfe/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-vida-mfe + namespace: moh-prod +spec: + replicas: 3 + selector: + matchLabels: + app: csi-vida-mfe + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-vida-mfe + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-vida-mfe + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/csi-vida-mfe:4.0.0.0 + imagePullPolicy: IfNotPresent + name: csi-vida-mfe + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/base/csi-vida-mfe/hpa.yaml b/base/csi-vida-mfe/hpa.yaml new file mode 100644 index 0000000..bd806b6 --- /dev/null +++ b/base/csi-vida-mfe/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-vida-mfe + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-vida-mfe # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/base/csi-vida-mfe/kustomization.yaml b/base/csi-vida-mfe/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/base/csi-vida-mfe/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/base/csi-vida-mfe/service.yaml b/base/csi-vida-mfe/service.yaml new file mode 100644 index 0000000..5a5ddcc --- /dev/null +++ b/base/csi-vida-mfe/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-vida-mfe-service + name: csi-vida-mfe-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-vida-mfe + type: ClusterIP \ No newline at end of file diff --git a/base/document-generator-core/Deployment.yaml b/base/document-generator-core/Deployment.yaml new file mode 100644 index 0000000..371cbd4 --- /dev/null +++ b/base/document-generator-core/Deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: document-generator-core + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: document-generator-core + tier: backend + track: stable + template: + metadata: + labels: + app: document-generator-core + module: base + tier: backend + track: stable + spec: + containers: + - image: registry.cloudsolutions.com.sa/vida-qa/document-generator-core:4.0.0.0-b1 + name: document-generator-core + ports: + - containerPort: 80 + name: http + - containerPort: 3000 + name: app + resources: + limits: + cpu: 500m + memory: 1250Mi + requests: + cpu: 50m + memory: 1000Mi + imagePullSecrets: + - name: regcred diff --git a/base/document-generator-core/hpa.yaml b/base/document-generator-core/hpa.yaml new file mode 100644 index 0000000..b757c21 --- /dev/null +++ b/base/document-generator-core/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: document-generator-core + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: document-generator-core # Mandatory. Must be in the same namespace as the ScaledObject + pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 5 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/base/document-generator-core/kustomization.yaml b/base/document-generator-core/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/base/document-generator-core/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/base/document-generator-core/post.yaml b/base/document-generator-core/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/base/document-generator-core/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/base/document-generator-core/service.yaml b/base/document-generator-core/service.yaml new file mode 100644 index 0000000..72f0d99 --- /dev/null +++ b/base/document-generator-core/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: document-generator-core + name: document-generator-core + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 3000 + selector: + app: document-generator-core + type: ClusterIP \ No newline at end of file diff --git a/base/formbuilderui/Deployment.yaml b/base/formbuilderui/Deployment.yaml new file mode 100644 index 0000000..7b3a292 --- /dev/null +++ b/base/formbuilderui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-form-builder-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-form-builder-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-form-builder-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-form-builder-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/form-builder-ui:4.0.264.3 + imagePullPolicy: IfNotPresent + name: csi-form-builder-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/base/formbuilderui/hpa.yaml b/base/formbuilderui/hpa.yaml new file mode 100644 index 0000000..71d5410 --- /dev/null +++ b/base/formbuilderui/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-form-builder-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-form-builder-ui + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 3 + maxReplicaCount: 4 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" \ No newline at end of file diff --git a/base/formbuilderui/kustomization.yaml b/base/formbuilderui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/base/formbuilderui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/base/formbuilderui/post.yaml b/base/formbuilderui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/base/formbuilderui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/base/formbuilderui/service.yaml b/base/formbuilderui/service.yaml new file mode 100644 index 0000000..a8289f9 --- /dev/null +++ b/base/formbuilderui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-form-builder-ui-service + name: csi-form-builder-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-form-builder-ui + type: ClusterIP \ No newline at end of file diff --git a/base/otp-service/Deployment.yaml b/base/otp-service/Deployment.yaml new file mode 100644 index 0000000..74859c1 --- /dev/null +++ b/base/otp-service/Deployment.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-otp-service + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-otp-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-otp-service + tier: backend + track: stable + spec: + containers: + - env: + - name: SPRING_REDIS_SENTINEL_MASTER + valueFrom: + configMapKeyRef: + key: SPRING_REDIS_SENTINEL_MASTER + name: otp-configs + - name: SPRING_REDIS_SENTINEL_NODES + valueFrom: + configMapKeyRef: + key: SPRING_REDIS_SENTINEL_NODES + name: otp-configs + - name: KAFKA_BOOTSTRAP_SERVERS + valueFrom: + configMapKeyRef: + key: KAFKA_BOOTSTRAP_SERVERS + name: otp-configs + image: registry.cloudsolutions.com.sa/vida-qa/csi-otp-service:4.0.0.0-b3 + imagePullPolicy: IfNotPresent + name: csi-otp-service + ports: + - containerPort: 80 + name: http + - containerPort: 3000 + name: app + resources: + limits: + cpu: 500m + memory: 1250Mi + requests: + cpu: 50m + memory: 512Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/base/otp-service/hpa.yaml b/base/otp-service/hpa.yaml new file mode 100644 index 0000000..480d1e9 --- /dev/null +++ b/base/otp-service/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-otp-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-otp-service # Mandatory. Must be in the same namespace as the ScaledObject + pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 5 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/base/otp-service/kustomization.yaml b/base/otp-service/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/base/otp-service/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/base/otp-service/post.yaml b/base/otp-service/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/base/otp-service/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/base/otp-service/service.yaml b/base/otp-service/service.yaml new file mode 100644 index 0000000..23764c9 --- /dev/null +++ b/base/otp-service/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-otp-service + name: csi-otp-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 3000 + selector: + app: csi-otp-service + type: ClusterIP \ No newline at end of file diff --git a/base/personalizationjava/Deployment.yaml b/base/personalizationjava/Deployment.yaml new file mode 100644 index 0000000..7f9c6a7 --- /dev/null +++ b/base/personalizationjava/Deployment.yaml @@ -0,0 +1,91 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-personalization + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-personalization + tier: backend + track: stable + template: + metadata: + labels: + app: csi-personalization + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-personalization + topologyKey: "kubernetes.io/hostname" + containers: + - env: + #- name: SPRING_DATA_MONGODB_HOST + # value: mongo + #- name: SPRING_DATA_MONGODB_PORT + # value: '27017' + - name: SPRING_DATA_MONGODB_URI + valueFrom: + configMapKeyRef: + key: csi.personalization.mongo.uri + name: security-database-configs + - name: hostname + value: csi-personalization-service + - name: EUREKA_INSTANCE_HOSTNAME + value: csi-personalization-service + - name: JAVA_OPTS + value: "-Xms256m -Xmx2048m" + - name: JVM_OPTS + value: "-Xms256m -Xmx2048m" + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: security-service-configs + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-personalization-service-java-sev:4.0.74.2 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 600 + timeoutSeconds: 10 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 10 + name: csi-personalization + ports: + - containerPort: 80 + name: http + resources: + limits: + cpu: 500m + memory: 2.5Gi + requests: + cpu: 250m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/base/personalizationjava/hpa.yaml b/base/personalizationjava/hpa.yaml new file mode 100644 index 0000000..849ccc4 --- /dev/null +++ b/base/personalizationjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-personalization + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-personalization # Mandatory. Must be in the same namespace as the ScaledObject + pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 5 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/base/personalizationjava/kustomization.yaml b/base/personalizationjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/base/personalizationjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/base/personalizationjava/post.yaml b/base/personalizationjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/base/personalizationjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/base/personalizationjava/service.yaml b/base/personalizationjava/service.yaml new file mode 100644 index 0000000..69d8bf1 --- /dev/null +++ b/base/personalizationjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-personalization-service + name: csi-personalization-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-personalization + type: ClusterIP \ No newline at end of file diff --git a/billing/billingmasterui/Deployment.yaml b/billing/billingmasterui/Deployment.yaml new file mode 100644 index 0000000..31eb124 --- /dev/null +++ b/billing/billingmasterui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-billing-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-billing-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-billing-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-billing-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/billing-ui:4.5.81.6 + imagePullPolicy: IfNotPresent + name: csi-billing-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/billing/billingmasterui/hpa.yaml b/billing/billingmasterui/hpa.yaml new file mode 100644 index 0000000..a386305 --- /dev/null +++ b/billing/billingmasterui/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-billing-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-billing-ui + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 3 + maxReplicaCount: 4 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" \ No newline at end of file diff --git a/billing/billingmasterui/kustomization.yaml b/billing/billingmasterui/kustomization.yaml new file mode 100644 index 0000000..6b890e1 --- /dev/null +++ b/billing/billingmasterui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml \ No newline at end of file diff --git a/billing/billingmasterui/post.yaml b/billing/billingmasterui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/billing/billingmasterui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/billing/billingmasterui/service.yaml b/billing/billingmasterui/service.yaml new file mode 100644 index 0000000..8c64e28 --- /dev/null +++ b/billing/billingmasterui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-billing-ui-service + name: csi-billing-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-billing-ui + type: ClusterIP \ No newline at end of file diff --git a/billing/bmapprovalui/Deployment.yaml b/billing/bmapprovalui/Deployment.yaml new file mode 100644 index 0000000..3584d70 --- /dev/null +++ b/billing/bmapprovalui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-approval-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-approval-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-approval-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-approval-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/approval-ui:4.3.132.4 + imagePullPolicy: IfNotPresent + name: csi-approval-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/billing/bmapprovalui/hpa.yaml b/billing/bmapprovalui/hpa.yaml new file mode 100644 index 0000000..323a805 --- /dev/null +++ b/billing/bmapprovalui/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-approval-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-approval-ui + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 3 + maxReplicaCount: 4 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" \ No newline at end of file diff --git a/billing/bmapprovalui/kustomization.yaml b/billing/bmapprovalui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/billing/bmapprovalui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/billing/bmapprovalui/post.yaml b/billing/bmapprovalui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/billing/bmapprovalui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/billing/bmapprovalui/service.yaml b/billing/bmapprovalui/service.yaml new file mode 100644 index 0000000..33bf619 --- /dev/null +++ b/billing/bmapprovalui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-approval-ui-service + name: csi-approval-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-approval-ui + type: ClusterIP \ No newline at end of file diff --git a/billing/bmbillingapprovaljava/Deployment.yaml b/billing/bmbillingapprovaljava/Deployment.yaml new file mode 100644 index 0000000..7db9296 --- /dev/null +++ b/billing/bmbillingapprovaljava/Deployment.yaml @@ -0,0 +1,94 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-bm-approval-java-serviceg + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-bm-approval-java-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-bm-approval-java-service + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-bm-approval-java-service + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: namespace + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: active_profile + name: service-configs-bm + - name: hostname + value: csi-bm-approval + - name: JAVA_OPTS + value: "-Xms1024m -Xmx2048m" + - name: JVM_OPTS + value: "-Xms1024m -Xmx2048m" + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: CSI_JPA_EVENT_ISREPORT + value: 'false' + - name: SPRING_JPA_PROPERTIES_HIBERNATE_TEMP_USE_JDBC_METADATA_DEFAULTS + value: 'true' + envFrom: + - configMapRef: + name: service-configs + - configMapRef: + name: service-configs-bm + - secretRef: + name: service-configs-secret + - secretRef: + name: service-bm-secret + image: harbor.moh.gov.sa/vidamoh/csi-bm-approval-java-service:4.3.147.4-hf1 + imagePullPolicy: IfNotPresent + name: csi-bm-approval-java-service + livenessProbe: + httpGet: + path: /approval/health/liveness + port: http + initialDelaySeconds: 800 + timeoutSeconds: 30 + periodSeconds: 40 + readinessProbe: + httpGet: + path: /approval/actuator/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 30 + periodSeconds: 40 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2.5Gi + requests: + cpu: 250m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/billing/bmbillingapprovaljava/hpa.yaml b/billing/bmbillingapprovaljava/hpa.yaml new file mode 100644 index 0000000..6ba6782 --- /dev/null +++ b/billing/bmbillingapprovaljava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-bm-approval-java-serviceg + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-bm-approval-java-serviceg # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 2 # Optional. Default: 0 + maxReplicaCount: 4 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/billing/bmbillingapprovaljava/kustomization.yaml b/billing/bmbillingapprovaljava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/billing/bmbillingapprovaljava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/billing/bmbillingapprovaljava/post.yaml b/billing/bmbillingapprovaljava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/billing/bmbillingapprovaljava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/billing/bmbillingapprovaljava/service.yaml b/billing/bmbillingapprovaljava/service.yaml new file mode 100644 index 0000000..88ae6d9 --- /dev/null +++ b/billing/bmbillingapprovaljava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-bm-approval + name: csi-bm-approval + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-bm-approval-java-service + type: ClusterIP diff --git a/billing/bmbillinginvoicejava/Deployment.yaml b/billing/bmbillinginvoicejava/Deployment.yaml new file mode 100644 index 0000000..97f8b95 --- /dev/null +++ b/billing/bmbillinginvoicejava/Deployment.yaml @@ -0,0 +1,102 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-bm-invoice-java-service + namespace: moh-prod +spec: +# replicas: 3 + selector: + matchLabels: + app: csi-bm-invoice-java-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-bm-invoice-java-service + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-bm-invoice-java-service + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: namespace + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: active_profile + name: service-configs-bm + - name: hostname + value: csi-bm-invoice + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: CSI_JPA_EVENT_ISREPORT + value: 'false' + - name: JAVA_OPTS + value: -Xms512m -Xmx1536m + - name: JVM_OPTS + value: -Xms512m -Xmx1536m + envFrom: + - configMapRef: + name: service-configs + - configMapRef: + name: service-configs-bm + - secretRef: + name: service-configs-secret + - secretRef: + name: service-bm-secret + image: harbor.moh.gov.sa/vidamoh/csi-bm-invoice-java-service:4.2.206.13-hf4 + imagePullPolicy: IfNotPresent + name: csi-bm-invoice-java-service + livenessProbe: + failureThreshold: 3 + httpGet: + path: /billing/health/liveness + port: http + initialDelaySeconds: 800 + timeoutSeconds: 30 + periodSeconds: 40 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /billing/actuator/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 30 + periodSeconds: 40 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2.5Gi + requests: + cpu: 600m + memory: 512Mi + volumeMounts: + - name: heapdumps-volume + mountPath: /app/heapdumps + imagePullSecrets: + - name: regcred + volumes: + - name: heapdumps-volume + hostPath: + path: /heapdumps + type: DirectoryOrCreate \ No newline at end of file diff --git a/billing/bmbillinginvoicejava/hpa.yaml b/billing/bmbillinginvoicejava/hpa.yaml new file mode 100644 index 0000000..9e6b64e --- /dev/null +++ b/billing/bmbillinginvoicejava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-bm-invoice-java-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-bm-invoice-java-service # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + #- type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/billing/bmbillinginvoicejava/kustomization.yaml b/billing/bmbillinginvoicejava/kustomization.yaml new file mode 100644 index 0000000..540acfb --- /dev/null +++ b/billing/bmbillinginvoicejava/kustomization.yaml @@ -0,0 +1,44 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml +#- ../../PreSync + +# patchesJson6902: +# - target: +# group: batch +# version: v1 +# kind: Job +# name: before +# patch: |- +# - op: replace +# path: /metadata/name +# value: before-bmbillinginvoicejava +# namespace: moh-prod +# - op: add +# path: /spec/template/spec/containers/0/env/- +# value: +# name: CSI_MODULENAME +# value: "csi-bm-invoice-java-service" +# - op: add +# path: /spec/template/spec/containers/0/env/- +# value: +# name: CSI_DATA_VERSION +# value: "4.2.846.0" +# - op: add +# path: /spec/template/spec/containers/0/env/- +# value: +# name: CSI_PROJECT_NAME +# value: "csi-bm-invoice-java-service" +# - op: add +# path: /spec/template/spec/containers/0/env/- +# value: +# name: CSI_MODULE_NAME +# value: "bmbillinginvoicejava" +# - op: add +# path: /spec/template/spec/containers/0/env/- +# value: +# name: CSI_PARENT_MODULE_NAME +# value: "billing" \ No newline at end of file diff --git a/billing/bmbillinginvoicejava/post.yaml b/billing/bmbillinginvoicejava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/billing/bmbillinginvoicejava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/billing/bmbillinginvoicejava/service.yaml b/billing/bmbillinginvoicejava/service.yaml new file mode 100644 index 0000000..269ba9d --- /dev/null +++ b/billing/bmbillinginvoicejava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-bm-invoice + name: csi-bm-invoice + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-bm-invoice-java-service + type: ClusterIP \ No newline at end of file diff --git a/billing/bmbillingjava/Deployment.yaml b/billing/bmbillingjava/Deployment.yaml new file mode 100644 index 0000000..0c78f14 --- /dev/null +++ b/billing/bmbillingjava/Deployment.yaml @@ -0,0 +1,102 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-bm-billing-java-service + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-bm-billing-java-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-bm-billing-java-service + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-bm-billing-java-service + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: namespace + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: active_profile + name: service-configs-bm + - name: hostname + value: csi-bm-billing + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: CSI_JPA_EVENT_ISREPORT + value: 'false' + - name: JVM_OPTS + value: "-Xms256m -Xmx2048m" + - name: JAVA_OPTS + value: "-XX:MaxMetaspaceSize=256m -Xms256m -Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/heapdumps/bm-java-heap-dump.hprof" + envFrom: + - configMapRef: + name: service-configs + - configMapRef: + name: service-configs-bm + - secretRef: + name: service-configs-secret + - secretRef: + name: service-bm-secret + image: harbor.moh.gov.sa/vidamoh/csi-bm-billing-java-service:4.5.77.1 + imagePullPolicy: IfNotPresent + name: csi-bm-billing-java-service + livenessProbe: + failureThreshold: 3 + httpGet: + path: /billing/actuator/health/liveness + port: http + initialDelaySeconds: 800 + timeoutSeconds: 30 + periodSeconds: 40 + ports: + - containerPort: 80 + name: http + readinessProbe: + failureThreshold: 3 + httpGet: + path: /billing/actuator/health + port: http + initialDelaySeconds: 20 + periodSeconds: 40 + successThreshold: 1 + timeoutSeconds: 30 + resources: + limits: + memory: 3Gi + requests: + cpu: 500m + memory: 1Gi + volumeMounts: + - name: heapdumps-volume + mountPath: /app/heapdumps + imagePullSecrets: + - name: regcred + volumes: + - name: heapdumps-volume + hostPath: + path: /heapdumps + type: DirectoryOrCreate \ No newline at end of file diff --git a/billing/bmbillingjava/hpa.yaml b/billing/bmbillingjava/hpa.yaml new file mode 100644 index 0000000..152d954 --- /dev/null +++ b/billing/bmbillingjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-bm-billing-java-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-bm-billing-java-service # Mandatory. Must be in the same namespace as the ScaledObject + pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "150" diff --git a/billing/bmbillingjava/kustomization.yaml b/billing/bmbillingjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/billing/bmbillingjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/billing/bmbillingjava/post.yaml b/billing/bmbillingjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/billing/bmbillingjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/billing/bmbillingjava/service.yaml b/billing/bmbillingjava/service.yaml new file mode 100644 index 0000000..b916efa --- /dev/null +++ b/billing/bmbillingjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-bm-billing + name: csi-bm-billing + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-bm-billing-java-service + type: ClusterIP \ No newline at end of file diff --git a/billing/bminvoiceui/Deployment.yaml b/billing/bminvoiceui/Deployment.yaml new file mode 100644 index 0000000..0cf0038 --- /dev/null +++ b/billing/bminvoiceui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-bm-invoice-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-bm-invoice-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-bm-invoice-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-bm-invoice-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/bm-invoice-ui:4.2.207.22 + imagePullPolicy: IfNotPresent + name: csi-bm-invoice-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/billing/bminvoiceui/hpa.yaml b/billing/bminvoiceui/hpa.yaml new file mode 100644 index 0000000..0ed98bd --- /dev/null +++ b/billing/bminvoiceui/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-bm-invoice-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-bm-invoice-ui + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 1 + maxReplicaCount: 2 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" \ No newline at end of file diff --git a/billing/bminvoiceui/kustomization.yaml b/billing/bminvoiceui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/billing/bminvoiceui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/billing/bminvoiceui/post.yaml b/billing/bminvoiceui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/billing/bminvoiceui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/billing/bminvoiceui/service.yaml b/billing/bminvoiceui/service.yaml new file mode 100644 index 0000000..a3915dc --- /dev/null +++ b/billing/bminvoiceui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-bm-invoice-ui-service + name: csi-bm-invoice-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-bm-invoice-ui + type: ClusterIP \ No newline at end of file diff --git a/billing/csi-bm-inte-bridge-java-service/Deployment.yaml b/billing/csi-bm-inte-bridge-java-service/Deployment.yaml new file mode 100644 index 0000000..870dcf2 --- /dev/null +++ b/billing/csi-bm-inte-bridge-java-service/Deployment.yaml @@ -0,0 +1,128 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-bm-inte-bridge-java-service + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-bm-inte-bridge-java-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-bm-inte-bridge-java-service + module: billing + tier: backend + track: stable + spec: +# initContainers: +# - env: +# - name: CSI_MODULENAME +# value: "csi-bm-invoice-java-service" +# - name: CSI_DATA_VERSION +# value: "4.2.502.0" +# - name: active_profile +# valueFrom: +# configMapKeyRef: +# key: activeProfile +# name: service-configs +# - name: SPRING_JPA_HIBERNATE_DIALECT +# valueFrom: +# configMapKeyRef: +# key: db-dialect +# name: service-configs +# - name: SPRING_JPA_DATABASE-PLATFORM +# valueFrom: +# configMapKeyRef: +# key: db-dialect +# name: service-configs +# - name: configserver +# valueFrom: +# configMapKeyRef: +# key: config_server +# name: service-configs +# - name: hostname +# value: csi-java-ehr-config +# envFrom: +# - configMapRef: +# name: init-database-configs +# - secretRef: +# name: init-database-secrets +# - configMapRef: +# name: service-configs +# - secretRef: +# name: service-configs-secret +# image: 'registry.cloudsolutions.com.sa/vida-qa/csi-database-initiator:V1.0.0.27' +# imagePullPolicy: IfNotPresent +# name: csi-bm-invoice-java-service-init +# resources: +# limits: +# cpu: 300m +# memory: 1Gi +# requests: +# cpu: 250m +# memory: 256Mi + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: active_profile + name: service-configs-bm + - name: hostname + value: csi-bm-inte-bridge + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: CSI_JPA_EVENT_ISREPORT + value: 'false' + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - configMapRef: + name: service-configs-bm + - secretRef: + name: service-configs-secret + - secretRef: + name: service-bm-secret + image: harbor.moh.gov.sa/vidamoh/csi-bm-inte-bridge-java-service:4.2.131.0 + imagePullPolicy: IfNotPresent + name: csi-bm-inte-bridge-java-service + ports: + - containerPort: 80 + name: http + readinessProbe: + failureThreshold: 3 + httpGet: + path: /inte-bridge/actuator/health + port: http + initialDelaySeconds: 20 + periodSeconds: 40 + timeoutSeconds: 30 + livenessProbe: + failureThreshold: 3 + httpGet: + path: /inte-bridge/actuator/health + port: http + initialDelaySeconds: 1200 + periodSeconds: 40 + timeoutSeconds: 30 + resources: + limits: + memory: 2Gi + requests: + cpu: 100m + memory: 750Mi + imagePullSecrets: + - name: regcred diff --git a/billing/csi-bm-inte-bridge-java-service/hpa.yaml b/billing/csi-bm-inte-bridge-java-service/hpa.yaml new file mode 100644 index 0000000..698170f --- /dev/null +++ b/billing/csi-bm-inte-bridge-java-service/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-bm-inte-bridge-java-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-bm-inte-bridge-java-service # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: AverageValue + # value: "2500Mi" \ No newline at end of file diff --git a/billing/csi-bm-inte-bridge-java-service/kustomization.yaml b/billing/csi-bm-inte-bridge-java-service/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/billing/csi-bm-inte-bridge-java-service/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/billing/csi-bm-inte-bridge-java-service/post.yaml b/billing/csi-bm-inte-bridge-java-service/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/billing/csi-bm-inte-bridge-java-service/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/billing/csi-bm-inte-bridge-java-service/service.yaml b/billing/csi-bm-inte-bridge-java-service/service.yaml new file mode 100644 index 0000000..184496f --- /dev/null +++ b/billing/csi-bm-inte-bridge-java-service/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-bm-inte-bridge + name: csi-bm-inte-bridge + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-bm-inte-bridge-java-service + type: ClusterIP \ No newline at end of file diff --git a/billing/csi-bm-promotion-java-service/Deployment.yaml b/billing/csi-bm-promotion-java-service/Deployment.yaml new file mode 100644 index 0000000..3cac1a2 --- /dev/null +++ b/billing/csi-bm-promotion-java-service/Deployment.yaml @@ -0,0 +1,58 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-bm-promotion-java-service + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-bm-promotion-java-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-bm-promotion-java-service + module: billing + tier: backend + track: stable + spec: + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: active_profile + name: service-configs-bm-promotional + - name: hostname + value: csi-bm-prm + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: +# - configMapRef: +# name: service-configs + - configMapRef: + name: service-configs-bm-promotional + - configMapRef: + name: service-configs +# - secretRef: +# name: service-configs-secret + - secretRef: + name: service-bm-secret + image: harbor.moh.gov.sa/vidamoh/csi-bm-promotion-java-service:4.6.0.10 + imagePullPolicy: IfNotPresent + name: csi-bm-promotion-java-service + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 50m + memory: 256Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/billing/csi-bm-promotion-java-service/hpa.yaml b/billing/csi-bm-promotion-java-service/hpa.yaml new file mode 100644 index 0000000..d49869f --- /dev/null +++ b/billing/csi-bm-promotion-java-service/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-bm-promotion-java-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-bm-promotion-java-service # Mandatory. Must be in the same namespace as the ScaledObject + pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "150" \ No newline at end of file diff --git a/billing/csi-bm-promotion-java-service/kustomization.yaml b/billing/csi-bm-promotion-java-service/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/billing/csi-bm-promotion-java-service/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/billing/csi-bm-promotion-java-service/post.yaml b/billing/csi-bm-promotion-java-service/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/billing/csi-bm-promotion-java-service/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/billing/csi-bm-promotion-java-service/service.yaml b/billing/csi-bm-promotion-java-service/service.yaml new file mode 100644 index 0000000..b772517 --- /dev/null +++ b/billing/csi-bm-promotion-java-service/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-bm-prm + name: csi-bm-prm + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-bm-promotion-java-service + type: ClusterIP \ No newline at end of file diff --git a/bloodbank/bb-bloodbankgui-mgt/Deployment.yaml b/bloodbank/bb-bloodbankgui-mgt/Deployment.yaml new file mode 100644 index 0000000..77adb3e --- /dev/null +++ b/bloodbank/bb-bloodbankgui-mgt/Deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-bloodbank-ui-mgmt + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-bloodbank-ui-mgmt + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-bloodbank-ui-mgmt + module: bloodbank + tier: frontend + track: stable + spec: + containers: + - image: harbor.moh.gov.sa/vidamoh/bloodbank-ui-mgmt:4.1.29.1 + imagePullPolicy: IfNotPresent + name: csi-bloodbank-ui-mgmt + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/bloodbank/bb-bloodbankgui-mgt/kustomization.yaml b/bloodbank/bb-bloodbankgui-mgt/kustomization.yaml new file mode 100644 index 0000000..58e34b7 --- /dev/null +++ b/bloodbank/bb-bloodbankgui-mgt/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml \ No newline at end of file diff --git a/bloodbank/bb-bloodbankgui-mgt/post.yaml b/bloodbank/bb-bloodbankgui-mgt/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/bloodbank/bb-bloodbankgui-mgt/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/bloodbank/bb-bloodbankgui-mgt/service.yaml b/bloodbank/bb-bloodbankgui-mgt/service.yaml new file mode 100644 index 0000000..be08825 --- /dev/null +++ b/bloodbank/bb-bloodbankgui-mgt/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-bloodbank-ui-mgmt-service + name: csi-bloodbank-ui-mgmt-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-bloodbank-ui-mgmt + type: ClusterIP \ No newline at end of file diff --git a/bloodbank/bloodbankjava/Deployment.yaml b/bloodbank/bloodbankjava/Deployment.yaml new file mode 100644 index 0000000..12424f2 --- /dev/null +++ b/bloodbank/bloodbankjava/Deployment.yaml @@ -0,0 +1,122 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-java-bb-service + namespace: moh-prod +spec: +# replicas: 2 + selector: + matchLabels: + app: csi-java-bb-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-java-bb-service + tier: backend + track: stable + spec: + 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: bloodbank-db-url + name: service-config-bloodbank + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: bloodbank-db-username + name: service-bloodbank-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: bloodbank-db-password + name: service-bloodbank-secret + - name: SPRING_DATASOURCE_JPA_DATABASE_PLATFORM + valueFrom: + configMapKeyRef: + key: bloodbank-db-platform + name: service-config-bloodbank + - 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-java-bb-service + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-java-bb-service:4.1.20.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /api/actuator/health + port: http + initialDelaySeconds: 800 + timeoutSeconds: 30 + periodSeconds: 40 + name: csi-java-bb-service + ports: + - containerPort: 80 + name: http + readinessProbe: + failureThreshold: 3 + httpGet: + path: /api/actuator/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 30 + periodSeconds: 40 + resources: + limits: + memory: 2Gi + requests: + cpu: 200m + memory: 1Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/bloodbank/bloodbankjava/hpa.yaml b/bloodbank/bloodbankjava/hpa.yaml new file mode 100644 index 0000000..19e74af --- /dev/null +++ b/bloodbank/bloodbankjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-java-bb-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-java-bb-service # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/bloodbank/bloodbankjava/kustomization.yaml b/bloodbank/bloodbankjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/bloodbank/bloodbankjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/bloodbank/bloodbankjava/post.yaml b/bloodbank/bloodbankjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/bloodbank/bloodbankjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/bloodbank/bloodbankjava/service.yaml b/bloodbank/bloodbankjava/service.yaml new file mode 100644 index 0000000..5660af5 --- /dev/null +++ b/bloodbank/bloodbankjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-bb-service + name: csi-java-bb-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-java-bb-service + type: ClusterIP \ No newline at end of file diff --git a/bloodbank/bloodbanknet/Deployment.yaml b/bloodbank/bloodbanknet/Deployment.yaml new file mode 100644 index 0000000..69c3647 --- /dev/null +++ b/bloodbank/bloodbanknet/Deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-bloodbnk + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-net-bloodbnk + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-bloodbnk + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-bloodbnk + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/bb-donation-srv:4.2.9.1 + imagePullPolicy: IfNotPresent + name: csi-net-bloodbnk + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1500Mi + requests: + cpu: 150m + memory: 512Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/bloodbank/bloodbanknet/hpa.yaml b/bloodbank/bloodbanknet/hpa.yaml new file mode 100644 index 0000000..780a494 --- /dev/null +++ b/bloodbank/bloodbanknet/hpa.yaml @@ -0,0 +1,24 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-bloodbnk + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-bloodbnk # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" + diff --git a/bloodbank/bloodbanknet/kustomization.yaml b/bloodbank/bloodbanknet/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/bloodbank/bloodbanknet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/bloodbank/bloodbanknet/post.yaml b/bloodbank/bloodbanknet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/bloodbank/bloodbanknet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/bloodbank/bloodbanknet/service.yaml b/bloodbank/bloodbanknet/service.yaml new file mode 100644 index 0000000..9030094 --- /dev/null +++ b/bloodbank/bloodbanknet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-bloodbnk + name: csi-net-bloodbnk + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-bloodbnk + type: ClusterIP \ No newline at end of file diff --git a/bloodbank/bloodbankui/Deployment.yaml b/bloodbank/bloodbankui/Deployment.yaml new file mode 100644 index 0000000..d3432b8 --- /dev/null +++ b/bloodbank/bloodbankui/Deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-bloodbank-ui + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-bloodbank-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-bloodbank-ui + tier: frontend + track: stable + spec: + containers: + - image: harbor.moh.gov.sa/vidamoh/bloodbank-ui:4.1.49.5 + imagePullPolicy: IfNotPresent + name: csi-bloodbank-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred diff --git a/bloodbank/bloodbankui/kustomization.yaml b/bloodbank/bloodbankui/kustomization.yaml new file mode 100644 index 0000000..915ed1b --- /dev/null +++ b/bloodbank/bloodbankui/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml diff --git a/bloodbank/bloodbankui/post.yaml b/bloodbank/bloodbankui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/bloodbank/bloodbankui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/bloodbank/bloodbankui/service.yaml b/bloodbank/bloodbankui/service.yaml new file mode 100644 index 0000000..0a94493 --- /dev/null +++ b/bloodbank/bloodbankui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-bloodbank-ui-service + name: csi-bloodbank-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-bloodbank-ui + type: ClusterIP \ No newline at end of file diff --git a/bloodbank/bloodtransfusionjava/Deployment.yaml b/bloodbank/bloodtransfusionjava/Deployment.yaml new file mode 100644 index 0000000..5c2767b --- /dev/null +++ b/bloodbank/bloodtransfusionjava/Deployment.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-java-blood-transfusion + namespace: moh-prod +spec: +# replicas: 3 + selector: + matchLabels: + app: csi-java-blood-transfusion + tier: backend + track: stable + template: + metadata: + labels: + app: csi-java-blood-transfusion + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-java-blood-transfusion + 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-configs-adt + - name: hostname + value: csi-java-blood-transfusion + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: bloodTransfusion-db-url + name: service-config-bloodbank + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: bloodTransfusion-db-username + name: service-bloodbank-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: bloodTransfusion-db-password + name: service-bloodbank-secret + - name: SPRING_DATASOURCE_JPA_DATABASE_PLATFORM + valueFrom: + configMapKeyRef: + key: bloodTransfusion-db-platform + name: service-config-bloodbank + envFrom: + - configMapRef: + name: service-configs + - configMapRef: + name: service-configs-adt + - secretRef: + name: service-configs-secret + - secretRef: + name: service-adt-secret + image: harbor.moh.gov.sa/vidamoh/csi-blood-transfusion-java:4.0.7.0 + imagePullPolicy: IfNotPresent + name: csi-java-blood-transfusion + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 250m + memory: 256Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/bloodbank/bloodtransfusionjava/hpa.yaml b/bloodbank/bloodtransfusionjava/hpa.yaml new file mode 100644 index 0000000..2256319 --- /dev/null +++ b/bloodbank/bloodtransfusionjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-java-blood-transfusion + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-java-blood-transfusion # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/bloodbank/bloodtransfusionjava/kustomization.yaml b/bloodbank/bloodtransfusionjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/bloodbank/bloodtransfusionjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/bloodbank/bloodtransfusionjava/post.yaml b/bloodbank/bloodtransfusionjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/bloodbank/bloodtransfusionjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/bloodbank/bloodtransfusionjava/service.yaml b/bloodbank/bloodtransfusionjava/service.yaml new file mode 100644 index 0000000..b8c7463 --- /dev/null +++ b/bloodbank/bloodtransfusionjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-blood-transfusion + name: csi-java-blood-transfusion + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-java-blood-transfusion + type: ClusterIP \ No newline at end of file diff --git a/bloodbank/csinetbbmgtsrv/Deployment.yaml b/bloodbank/csinetbbmgtsrv/Deployment.yaml new file mode 100644 index 0000000..977e468 --- /dev/null +++ b/bloodbank/csinetbbmgtsrv/Deployment.yaml @@ -0,0 +1,63 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-bloodbnk-mgt + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-net-bloodbnk-mgt + tier: backend + track: stable + version: v1 + template: + metadata: + labels: + app: csi-net-bloodbnk-mgt + module: lab + tier: backend + track: stable + version: v1 + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: 'harbor.moh.gov.sa/vidamoh/csi-net-bb-mgt-srv:4.0.0.0-a9' + imagePullPolicy: IfNotPresent + name: csi-net-bloodbnk-mgt + readinessProbe: + httpGet: # make an HTTP request + path: /health/ready # endpoint to hit + port: 80 # port to use + initialDelaySeconds: 30 # how long to wait before checking + failureThreshold: 10 # how many failures to accept before failing + periodSeconds: 20 # how long to wait between checks + livenessProbe: + httpGet: + path: /health/live + port: 80 + initialDelaySeconds: 60 + failureThreshold: 10 + periodSeconds: 30 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 3Gi + requests: + cpu: 150m + memory: 512Mi + imagePullSecrets: + - name: regcred diff --git a/bloodbank/csinetbbmgtsrv/hpa.yaml b/bloodbank/csinetbbmgtsrv/hpa.yaml new file mode 100644 index 0000000..53b6c34 --- /dev/null +++ b/bloodbank/csinetbbmgtsrv/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-bloodbnk-mgt + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-bloodbnk-mgt # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" \ No newline at end of file diff --git a/bloodbank/csinetbbmgtsrv/kustomization.yaml b/bloodbank/csinetbbmgtsrv/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/bloodbank/csinetbbmgtsrv/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/bloodbank/csinetbbmgtsrv/post.yaml b/bloodbank/csinetbbmgtsrv/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/bloodbank/csinetbbmgtsrv/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/bloodbank/csinetbbmgtsrv/service.yaml b/bloodbank/csinetbbmgtsrv/service.yaml new file mode 100644 index 0000000..e74e72b --- /dev/null +++ b/bloodbank/csinetbbmgtsrv/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-bloodbnk-mgt + name: csi-net-bloodbnk-mgt + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-bloodbnk-mgt + type: ClusterIP diff --git a/cssd/csi-cssd-java-sev/Deployment.yaml b/cssd/csi-cssd-java-sev/Deployment.yaml new file mode 100644 index 0000000..6a4756a --- /dev/null +++ b/cssd/csi-cssd-java-sev/Deployment.yaml @@ -0,0 +1,131 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-cssd-java-sev + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-cssd-java-sev + tier: backend + track: stable + template: + metadata: + labels: + app: csi-cssd-java-sev + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-cssd-java-sev + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: service-configs-cssd + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-cssd-username + name: service-cssd-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-cssd-password + name: service-cssd-secret + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: SPRING_JPA_HIBERNATE_DIALECT + name: service-configs-cssd + - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME + valueFrom: + configMapKeyRef: + key: db-driver + name: service-configs + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: SPRING_JPA_HIBERNATE_DIALECT + name: service-configs + - name: HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE + valueFrom: + secretKeyRef: + key: db-database + name: service-cssd-secret + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-cssd-java-sev + envFrom: + - configMapRef: + name: service-configs + image: registry.cloudsolutions.com.sa/dev/csi-cssd-java-sev:4.1.2406.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /cssd/actuator/health + port: http + initialDelaySeconds: 800 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /cssd/actuator/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 10 + name: csi-cssd-java-sev + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 600m + memory: 1Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/cssd/csi-cssd-java-sev/hpa.yaml b/cssd/csi-cssd-java-sev/hpa.yaml new file mode 100644 index 0000000..b472267 --- /dev/null +++ b/cssd/csi-cssd-java-sev/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-cssd-java-sev + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-cssd-java-sev # Mandatory. Must be in the same namespace as the ScaledObject + pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "150" \ No newline at end of file diff --git a/cssd/csi-cssd-java-sev/kustomization.yaml b/cssd/csi-cssd-java-sev/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/cssd/csi-cssd-java-sev/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/cssd/csi-cssd-java-sev/service.yaml b/cssd/csi-cssd-java-sev/service.yaml new file mode 100644 index 0000000..c47a5cc --- /dev/null +++ b/cssd/csi-cssd-java-sev/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-cssd-java-sev + name: csi-cssd-java-sev + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-cssd-java-sev + type: ClusterIP \ No newline at end of file diff --git a/cssd/csi-cssd-node-sev/Deployment.yaml b/cssd/csi-cssd-node-sev/Deployment.yaml new file mode 100644 index 0000000..26ef480 --- /dev/null +++ b/cssd/csi-cssd-node-sev/Deployment.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-cssd-node-sev + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-cssd-node-sev + tier: backend + track: stable + template: + metadata: + labels: + app: csi-cssd-node-sev + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-cssd-node-sev + topologyKey: "kubernetes.io/hostname" + containers: + - env: + # - name: BASE_URL + # valueFrom: + # configMapKeyRef: + # key: BASE_URL + # name: service-configs-cssd-node + # - name: PORT + # valueFrom: + # configMapKeyRef: + # key: PORT + # name: service-configs-cssd-node + - name: hostname + value: csi-cssd-node-sev + envFrom: + - configMapRef: + name: service-configs-cssd + - configMapRef: + name: service-configs-cssd-node + image: registry.cloudsolutions.com.sa/dev/csi-cssd-node-sev:V4.0.0724-13_dev + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /cssd/actuator/health + port: http + initialDelaySeconds: 800 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /cssd/actuator/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 10 + name: csi-cssd-node-sev + ports: + - containerPort: 8080 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 600m + memory: 1Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/cssd/csi-cssd-node-sev/hpa.yaml b/cssd/csi-cssd-node-sev/hpa.yaml new file mode 100644 index 0000000..3f649f5 --- /dev/null +++ b/cssd/csi-cssd-node-sev/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-cssd-node-sev + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-cssd-node-sev # Mandatory. Must be in the same namespace as the ScaledObject + pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "150" \ No newline at end of file diff --git a/cssd/csi-cssd-node-sev/kustomization.yaml b/cssd/csi-cssd-node-sev/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/cssd/csi-cssd-node-sev/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/cssd/csi-cssd-node-sev/service.yaml b/cssd/csi-cssd-node-sev/service.yaml new file mode 100644 index 0000000..ae6de60 --- /dev/null +++ b/cssd/csi-cssd-node-sev/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-cssd-node-sev + name: csi-cssd-node-sev + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 8080 + selector: + app: csi-cssd-node-sev + type: ClusterIP \ No newline at end of file diff --git a/cssd/csi-cssd-ui/Deployment.yaml b/cssd/csi-cssd-ui/Deployment.yaml new file mode 100644 index 0000000..584f524 --- /dev/null +++ b/cssd/csi-cssd-ui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-cssd-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-cssd-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-cssd-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-cssd-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: registry.cloudsolutions.com.sa/vida-qa/csi-cssd-ui:4.0.42.0 + imagePullPolicy: IfNotPresent + name: csi-cssd-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/cssd/csi-cssd-ui/hpa.yaml b/cssd/csi-cssd-ui/hpa.yaml new file mode 100644 index 0000000..c76ec4f --- /dev/null +++ b/cssd/csi-cssd-ui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-cssd-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-cssd-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/cssd/csi-cssd-ui/kustomization.yaml b/cssd/csi-cssd-ui/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/cssd/csi-cssd-ui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/cssd/csi-cssd-ui/service.yaml b/cssd/csi-cssd-ui/service.yaml new file mode 100644 index 0000000..296b27d --- /dev/null +++ b/cssd/csi-cssd-ui/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-cssd-ui + name: csi-cssd-ui + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-cssd-ui + type: ClusterIP \ No newline at end of file diff --git a/dms/csi-document-management-service/Deployment.yaml b/dms/csi-document-management-service/Deployment.yaml new file mode 100644 index 0000000..901bc25 --- /dev/null +++ b/dms/csi-document-management-service/Deployment.yaml @@ -0,0 +1,72 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-document-management-service + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-document-management-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-document-management-service + module: reporting + tier: backend + track: stable + spec: +# initContainers: +# - name: create-dirs +# image: 'registry.cloudsolutions.com.sa/public/busybox:busybox' +# command: ["sh", "-c","mkdir -p /home/data/downloads/ws /home/data/downloads/unzip /home/data/downloads/tempDownload /home/data/upload /home/data/thumbnails/temp /home/data/thumbnails/zip /home/data/thumbnails/unzip"] +# volumeMounts: +# - name: create-dirs #csi-document-management-service +# mountPath: /app + containers: + - env: + - name: SECURITY_IAM_URL + value: 'https://csi-iam-service/' + - name: hostname + value: csi-reporting-service + envFrom: + - configMapRef: + name: service-configs-document-management-service + - secretRef: + name: service-secret-document-management-service + image: 'harbor.moh.gov.sa/vidamoh/csi-document-management-service:1.0.0.2' + imagePullPolicy: IfNotPresent +# command: ["sh"] + volumeMounts: + - name: create-dirs #csi-document-management-service + mountPath: /home/data/downloads/ws + - name: create-dirs + mountPath: /home/data/downloads/unzip + - name: create-dirs + mountPath: /home/data/downloads/tempDownload + - name: create-dirs + mountPath: /home/data/upload + - name: create-dirs + mountPath: /home/data/thumbnails/temp + - name: create-dirs + mountPath: /home/data/thumbnails/zip + - name: create-dirs + mountPath: /home/data/thumbnails/unzip + name: csi-document-management-service + ports: + - containerPort: 8080 + name: http + protocol: TCP + resources: + limits: + memory: 4Gi + requests: + cpu: 250m + memory: 750Mi + volumes: + - name: create-dirs + emptyDir: {} + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/dms/csi-document-management-service/hpa.yaml b/dms/csi-document-management-service/hpa.yaml new file mode 100644 index 0000000..36b738b --- /dev/null +++ b/dms/csi-document-management-service/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-document-management-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-document-management-service + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 1 + maxReplicaCount: 3 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" \ No newline at end of file diff --git a/dms/csi-document-management-service/kustomization.yaml b/dms/csi-document-management-service/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/dms/csi-document-management-service/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/dms/csi-document-management-service/post.yaml b/dms/csi-document-management-service/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/dms/csi-document-management-service/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/dms/csi-document-management-service/service.yaml b/dms/csi-document-management-service/service.yaml new file mode 100644 index 0000000..860ca7a --- /dev/null +++ b/dms/csi-document-management-service/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-document-management-service + name: csi-document-management-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-document-management-service + type: ClusterIP \ No newline at end of file diff --git a/dms/dmsmiddleware/Deployment.yaml b/dms/dmsmiddleware/Deployment.yaml new file mode 100644 index 0000000..f8b5897 --- /dev/null +++ b/dms/dmsmiddleware/Deployment.yaml @@ -0,0 +1,110 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: document-management-middleware + namespace: moh-prod +spec: + # replicas: 3 + selector: + matchLabels: + app: document-management-middleware + tier: backend + track: stable + template: + metadata: + labels: + app: document-management-middleware + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - document-management-middleware + topologyKey: "kubernetes.io/hostname" + containers: + - envFrom: + - configMapRef: + name: service-configs-dms + - secretRef: + name: service-secret-dms + env: + - name: db_user + valueFrom: + secretKeyRef: + key: db_user + name: service-secret-dms + - name: db_password + valueFrom: + secretKeyRef: + key: db_password + name: service-secret-dms + - name: mongo_connection_string + valueFrom: + configMapKeyRef: + key: mongo_connection_string + name: service-configs-dms + - name: kafka_bootstrap_servers + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_BOOTSTRAPADDRESS + name: service-configs + - name: elk_log_topic + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_TOPIC + name: service-configs + - name: CSI_ENV_PREFIX + valueFrom: + configMapKeyRef: + key: CSI_ENV_PREFIX + name: service-configs + - name: db_numthreads + valueFrom: + configMapKeyRef: + key: db_numthreads + name: service-configs-dms + - name: db_maxconnections + valueFrom: + configMapKeyRef: + key: db_maxconnections + name: service-configs-dms + - name: db_queuesize + valueFrom: + configMapKeyRef: + key: db_queuesize + name: service-configs-dms + - name: db_idletimeout + valueFrom: + configMapKeyRef: + key: db_idletimeout + name: service-configs-dms + - name: db_connectiontimeout + valueFrom: + configMapKeyRef: + key: db_connectiontimeout + name: service-configs-dms + - name: db_maxlifetime + valueFrom: + configMapKeyRef: + key: db_maxlifetime + name: service-configs-dms + image: harbor.moh.gov.sa/vidamoh/document-management-middleware:4.1.2.0-hf01 + imagePullPolicy: IfNotPresent + name: document-management-middleware + ports: + - containerPort: 8080 + name: http + resources: + limits: + memory: 4Gi + requests: + cpu: 100m + memory: 2Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/dms/dmsmiddleware/hpa.yaml b/dms/dmsmiddleware/hpa.yaml new file mode 100644 index 0000000..b998d07 --- /dev/null +++ b/dms/dmsmiddleware/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: document-management-middleware + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: document-management-middleware # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/dms/dmsmiddleware/kustomization.yaml b/dms/dmsmiddleware/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/dms/dmsmiddleware/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/dms/dmsmiddleware/post.yaml b/dms/dmsmiddleware/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/dms/dmsmiddleware/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/dms/dmsmiddleware/service.yaml b/dms/dmsmiddleware/service.yaml new file mode 100644 index 0000000..bbc903c --- /dev/null +++ b/dms/dmsmiddleware/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: document-management-middleware + name: document-management-middleware + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 8080 + selector: + app: document-management-middleware + type: ClusterIP diff --git a/dms/dmsstorageengine/Deployment.yaml b/dms/dmsstorageengine/Deployment.yaml new file mode 100644 index 0000000..91c7217 --- /dev/null +++ b/dms/dmsstorageengine/Deployment.yaml @@ -0,0 +1,82 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: document-storage-engine-service + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: document-storage-engine-service + tier: backend + track: stable + template: + metadata: + labels: + app: document-storage-engine-service + tier: backend + track: stable + spec: + containers: + - env: + - name: PROFILE + value: prod + - name: db_host + valueFrom: + configMapKeyRef: + key: db_host + name: service-configs-dms + - name: db_user + valueFrom: + secretKeyRef: + key: db_user + name: service-secret-dms + - name: db_password + valueFrom: + secretKeyRef: + key: db_password + name: service-secret-dms + - name: minio_endpoint + valueFrom: + configMapKeyRef: + key: minio_endpoint + name: service-configs-dms + - name: minio_accessKey + valueFrom: + secretKeyRef: + key: minio_accessKey + name: service-secret-dms + - name: minio_secretKey + valueFrom: + secretKeyRef: + key: minio_secretKey + name: service-secret-dms + - name: kafka_bootstrap_servers + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_BOOTSTRAPADDRESS + name: service-configs + - name: elk_log_topic + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_TOPIC + name: service-configs + - name: CSI_ENV_PREFIX + valueFrom: + configMapKeyRef: + key: CSI_ENV_PREFIX + name: service-configs + image: harbor.moh.gov.sa/vidamoh/document-management-engine:1.5.9 + imagePullPolicy: IfNotPresent + name: document-storage-engine-service + ports: + - containerPort: 8080 + name: http + resources: + limits: + memory: 3Gi + requests: + cpu: 50m + memory: 2Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/dms/dmsstorageengine/hpa.yaml b/dms/dmsstorageengine/hpa.yaml new file mode 100644 index 0000000..95cfbff --- /dev/null +++ b/dms/dmsstorageengine/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: document-storage-engine-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: document-storage-engine-service # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/dms/dmsstorageengine/kustomization.yaml b/dms/dmsstorageengine/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/dms/dmsstorageengine/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/dms/dmsstorageengine/post.yaml b/dms/dmsstorageengine/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/dms/dmsstorageengine/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/dms/dmsstorageengine/service.yaml b/dms/dmsstorageengine/service.yaml new file mode 100644 index 0000000..12201e0 --- /dev/null +++ b/dms/dmsstorageengine/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: document-storage-engine-service + name: document-storage-engine-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 8080 + selector: + app: document-storage-engine-service + type: ClusterIP \ No newline at end of file diff --git a/dms/dmsui/Deployment.yaml b/dms/dmsui/Deployment.yaml new file mode 100644 index 0000000..3a70d2e --- /dev/null +++ b/dms/dmsui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-dms-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-dms-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-dms-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-dms-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/dms-ui:4.1.7.3-hf01 + imagePullPolicy: IfNotPresent + name: csi-dms-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/dms/dmsui/hpa.yaml b/dms/dmsui/hpa.yaml new file mode 100644 index 0000000..e13c59c --- /dev/null +++ b/dms/dmsui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-dms-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-dms-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 2 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/dms/dmsui/kustomization.yaml b/dms/dmsui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/dms/dmsui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/dms/dmsui/post.yaml b/dms/dmsui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/dms/dmsui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/dms/dmsui/service.yaml b/dms/dmsui/service.yaml new file mode 100644 index 0000000..82d5726 --- /dev/null +++ b/dms/dmsui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-dms-ui-service + name: csi-dms-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-dms-ui + type: ClusterIP \ No newline at end of file diff --git a/econsent/e-consent-mgt-ui/Deployment.yaml b/econsent/e-consent-mgt-ui/Deployment.yaml new file mode 100644 index 0000000..fa8572a --- /dev/null +++ b/econsent/e-consent-mgt-ui/Deployment.yaml @@ -0,0 +1,42 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: e-consent-mgt-ui + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: e-consent-mgt-ui + tier: backend + track: stable + template: + metadata: + labels: + app: e-consent-mgt-ui + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: VERSION + value: '${parameters.Tag}' + envFrom: + - configMapRef: + name: econsent-service-mnt-configs + image: 'harbor.moh.gov.sa/vidamoh/e-consent-mgt-ui:3.2' + imagePullPolicy: IfNotPresent + name: e-consent-mgt-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 25m + memory: 256Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/econsent/e-consent-mgt-ui/kustomization.yaml b/econsent/e-consent-mgt-ui/kustomization.yaml new file mode 100644 index 0000000..58e34b7 --- /dev/null +++ b/econsent/e-consent-mgt-ui/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml \ No newline at end of file diff --git a/econsent/e-consent-mgt-ui/post.yaml b/econsent/e-consent-mgt-ui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/econsent/e-consent-mgt-ui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/econsent/e-consent-mgt-ui/service.yaml b/econsent/e-consent-mgt-ui/service.yaml new file mode 100644 index 0000000..0f20941 --- /dev/null +++ b/econsent/e-consent-mgt-ui/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: e-consent-mgt-ui + name: e-consent-mgt-ui + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: e-consent-mgt-ui + type: ClusterIP \ No newline at end of file diff --git a/econsent/e-consent-v2/Deployment.yaml b/econsent/e-consent-v2/Deployment.yaml new file mode 100644 index 0000000..997cc17 --- /dev/null +++ b/econsent/e-consent-v2/Deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: e-consent-v2 + namespace: csi-dev +spec: + #replicas: 2 + selector: + matchLabels: + app: e-consent-v2 + tier: frontend + track: stable + template: + metadata: + labels: + app: e-consent-v2 + module: e-consent + tier: frontend + track: stable + spec: + containers: + - image: 'registry.cloudsolutions.com.sa/vida-qa/e-consent-v2:1.0.8' + imagePullPolicy: IfNotPresent + name: e-consent-v2 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/econsent/e-consent-v2/hpa.yaml b/econsent/e-consent-v2/hpa.yaml new file mode 100644 index 0000000..cfd64b6 --- /dev/null +++ b/econsent/e-consent-v2/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: e-consent-v2 + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: e-consent-v2 # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 3 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/econsent/e-consent-v2/kustomization.yaml b/econsent/e-consent-v2/kustomization.yaml new file mode 100644 index 0000000..6b890e1 --- /dev/null +++ b/econsent/e-consent-v2/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml \ No newline at end of file diff --git a/econsent/e-consent-v2/post.yaml b/econsent/e-consent-v2/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/econsent/e-consent-v2/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/econsent/e-consent-v2/service.yaml b/econsent/e-consent-v2/service.yaml new file mode 100644 index 0000000..80220f9 --- /dev/null +++ b/econsent/e-consent-v2/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: e-consent-v2 + name: e-consent-v2 + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: e-consent-v2 + type: ClusterIP \ No newline at end of file diff --git a/econsent/econsent/Deployment.yaml b/econsent/econsent/Deployment.yaml new file mode 100644 index 0000000..0a6cd3f --- /dev/null +++ b/econsent/econsent/Deployment.yaml @@ -0,0 +1,54 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cs-net-econsent + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: cs-net-econsent + tier: backend + track: stable + template: + metadata: + labels: + app: cs-net-econsent + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - cs-net-econsent + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: VERSION + value: '${parameters.Tag}' + envFrom: + - configMapRef: + name: econsent-service-configs + image: harbor.moh.gov.sa/vidamoh/e-consent:v2.5 + imagePullPolicy: IfNotPresent + name: cs-net-econsent + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 50m + memory: 1Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/econsent/econsent/hpa.yaml b/econsent/econsent/hpa.yaml new file mode 100644 index 0000000..40398fd --- /dev/null +++ b/econsent/econsent/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: cs-net-econsent + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: cs-net-econsent # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 5 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/econsent/econsent/kustomization.yaml b/econsent/econsent/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/econsent/econsent/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/econsent/econsent/post.yaml b/econsent/econsent/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/econsent/econsent/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/econsent/econsent/service.yaml b/econsent/econsent/service.yaml new file mode 100644 index 0000000..0d81201 --- /dev/null +++ b/econsent/econsent/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: cs-net-econsent + name: cs-net-econsent + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: cs-net-econsent + type: ClusterIP diff --git a/econsent/econsentsrv/Deployment.yaml b/econsent/econsentsrv/Deployment.yaml new file mode 100644 index 0000000..0422989 --- /dev/null +++ b/econsent/econsentsrv/Deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cs-net-econsent-srv + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: cs-net-econsent-srv + tier: backend + track: stable + template: + metadata: + labels: + app: cs-net-econsent-srv + module: econsent + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: VERSION + value: '${parameters.Tag}' + envFrom: + - configMapRef: + name: econsent-service-mnt-configs + image: harbor.moh.gov.sa/vidamoh/e-consent-srv:3.6 + imagePullPolicy: IfNotPresent + name: cs-net-econsent-srv + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 25m + memory: 256Mi + imagePullSecrets: + - name: regcred diff --git a/econsent/econsentsrv/hpa.yaml b/econsent/econsentsrv/hpa.yaml new file mode 100644 index 0000000..63228d6 --- /dev/null +++ b/econsent/econsentsrv/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: cs-net-econsent-srv + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-base-utility # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 5 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" diff --git a/econsent/econsentsrv/kustomization.yaml b/econsent/econsentsrv/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/econsent/econsentsrv/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/econsent/econsentsrv/post.yaml b/econsent/econsentsrv/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/econsent/econsentsrv/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/econsent/econsentsrv/service.yaml b/econsent/econsentsrv/service.yaml new file mode 100644 index 0000000..1b97dc8 --- /dev/null +++ b/econsent/econsentsrv/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: cs-net-econsent-srv + name: cs-net-econsent-srv + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: cs-net-econsent-srv + type: ClusterIP diff --git a/econsent/econsentui/Deployment.yaml b/econsent/econsentui/Deployment.yaml new file mode 100644 index 0000000..1dc55ae --- /dev/null +++ b/econsent/econsentui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cs-net-econsentui + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: cs-net-econsentui + tier: backend + track: stable + template: + metadata: + labels: + app: cs-net-econsentui + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: VERSION + value: '${parameters.Tag}' + envFrom: + - configMapRef: + name: econsent-service-configs + image: harbor.moh.gov.sa/vidamoh/e-consent-ui:ECN.V2.0.4-test-4 + imagePullPolicy: IfNotPresent + name: cs-net-econsentui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 25m + memory: 256Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/econsent/econsentui/hpa.yaml b/econsent/econsentui/hpa.yaml new file mode 100644 index 0000000..5857c21 --- /dev/null +++ b/econsent/econsentui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: cs-net-econsentui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: cs-net-econsentui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/econsent/econsentui/kustomization.yaml b/econsent/econsentui/kustomization.yaml new file mode 100644 index 0000000..6b890e1 --- /dev/null +++ b/econsent/econsentui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml \ No newline at end of file diff --git a/econsent/econsentui/post.yaml b/econsent/econsentui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/econsent/econsentui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/econsent/econsentui/service.yaml b/econsent/econsentui/service.yaml new file mode 100644 index 0000000..4549b63 --- /dev/null +++ b/econsent/econsentui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: cs-net-econsentui + name: cs-net-econsentui + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: cs-net-econsentui + type: ClusterIP \ No newline at end of file diff --git a/ehr/csi-ehr-opd-ui-master/Deployment.yaml b/ehr/csi-ehr-opd-ui-master/Deployment.yaml new file mode 100644 index 0000000..a76e870 --- /dev/null +++ b/ehr/csi-ehr-opd-ui-master/Deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-opd-ui-master + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-ehr-opd-ui-master + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-ehr-opd-ui-master + module: ehr + tier: frontend + track: stable + spec: + containers: + - image: 'harbor.moh.gov.sa/vidamoh/ehr-opd-ui:4.0.1359.0' + imagePullPolicy: IfNotPresent + name: csi-ehr-opd-ui-master + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/csi-ehr-opd-ui-master/kustomization.yaml b/ehr/csi-ehr-opd-ui-master/kustomization.yaml new file mode 100644 index 0000000..58e34b7 --- /dev/null +++ b/ehr/csi-ehr-opd-ui-master/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml \ No newline at end of file diff --git a/ehr/csi-ehr-opd-ui-master/post.yaml b/ehr/csi-ehr-opd-ui-master/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/csi-ehr-opd-ui-master/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/csi-ehr-opd-ui-master/service.yaml b/ehr/csi-ehr-opd-ui-master/service.yaml new file mode 100644 index 0000000..ef2e4cb --- /dev/null +++ b/ehr/csi-ehr-opd-ui-master/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-ehr-opd-ui-master-service + name: csi-ehr-opd-ui-master-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-opd-ui-master + type: ClusterIP \ No newline at end of file diff --git a/ehr/ehr-data-stream-core/Deployment.yaml b/ehr/ehr-data-stream-core/Deployment.yaml new file mode 100644 index 0000000..ee92aa6 --- /dev/null +++ b/ehr/ehr-data-stream-core/Deployment.yaml @@ -0,0 +1,132 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-data-stream-core + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-ehr-data-stream-core + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-data-stream-core + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-data-stream-core + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-com-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-com-password + name: ehr-database-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: SPRING_JPA_DATABASE + valueFrom: + secretKeyRef: + key: db-database + name: ehr-database-secret + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret +# - name: hostname +# value: csi-ehr-data-stream-core +# - name: JVM_OPTS +# value: "-Xms2048m -Xmx2048m" +# - name: JAVA_OPTS +# value: "-Xms2048m -Xmx2048m" + envFrom: + - configMapRef: + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-common-java-sev:4.1.122.4 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-ehr-data-stream-core + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2.5Gi + requests: + cpu: 600m + memory: 2.5Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehr-data-stream-core/hpa.yaml b/ehr/ehr-data-stream-core/hpa.yaml new file mode 100644 index 0000000..0b97224 --- /dev/null +++ b/ehr/ehr-data-stream-core/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-data-stream-core + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-data-stream-core # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + #- type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehr-data-stream-core/kustomization.yaml b/ehr/ehr-data-stream-core/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/ehr/ehr-data-stream-core/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/ehr/ehr-data-stream-core/post.yaml b/ehr/ehr-data-stream-core/post.yaml new file mode 100644 index 0000000..aa137d9 --- /dev/null +++ b/ehr/ehr-data-stream-core/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 \ No newline at end of file diff --git a/ehr/ehr-data-stream-core/service.yaml b/ehr/ehr-data-stream-core/service.yaml new file mode 100644 index 0000000..5ea9b73 --- /dev/null +++ b/ehr/ehr-data-stream-core/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-ehr-data-stream-core-svc + name: csi-ehr-data-stream-core-svc + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-data-stream-core + type: ClusterIP \ No newline at end of file diff --git a/ehr/ehrcommonjava/Deployment.yaml b/ehr/ehrcommonjava/Deployment.yaml new file mode 100644 index 0000000..2f55cbc --- /dev/null +++ b/ehr/ehrcommonjava/Deployment.yaml @@ -0,0 +1,132 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-common + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-ehr-common + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-common + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-common + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-com-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-com-password + name: ehr-database-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: SPRING_JPA_DATABASE + valueFrom: + secretKeyRef: + key: db-database + name: ehr-database-secret + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-common + - name: JVM_OPTS + value: "-Xms512m -Xmx1536m" + - name: JAVA_OPTS + value: "-Xms512m -Xmx1536m" + envFrom: + - configMapRef: + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-common-java-sev:4.1.122.4 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-ehr-common + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2.5Gi + requests: + cpu: 600m + memory: 512Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehrcommonjava/hpa.yaml b/ehr/ehrcommonjava/hpa.yaml new file mode 100644 index 0000000..33a3443 --- /dev/null +++ b/ehr/ehrcommonjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-common + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-common # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + #- type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehrcommonjava/kustomization.yaml b/ehr/ehrcommonjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrcommonjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrcommonjava/post.yaml b/ehr/ehrcommonjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrcommonjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrcommonjava/service.yaml b/ehr/ehrcommonjava/service.yaml new file mode 100644 index 0000000..4afc991 --- /dev/null +++ b/ehr/ehrcommonjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-common + name: csi-java-ehr-common + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-common + type: ClusterIP diff --git a/ehr/ehrconfigjava/Deployment.yaml b/ehr/ehrconfigjava/Deployment.yaml new file mode 100644 index 0000000..d635551 --- /dev/null +++ b/ehr/ehrconfigjava/Deployment.yaml @@ -0,0 +1,120 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-config + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-ehr-config + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-config + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-config + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-con-username + name: ehr-database-secret + - name: SPRING_SECOND-DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url-second + name: ehr-database-configs + - name: SPRING_SECOND-DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-con-username-second + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-con-password + name: ehr-database-secret + - name: SPRING_SECOND-DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-con-password-second + name: ehr-database-secret + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: hostname + value: csi-java-ehr-config + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-config-java-sev:4.1.7.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 1200 + timeoutSeconds: 30 + failureThreshold: 3 + periodSeconds: 40 + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-ehr-config + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 250m + memory: 512Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehrconfigjava/hpa.yaml b/ehr/ehrconfigjava/hpa.yaml new file mode 100644 index 0000000..86a26d7 --- /dev/null +++ b/ehr/ehrconfigjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-config + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-config # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehrconfigjava/kustomization.yaml b/ehr/ehrconfigjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrconfigjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrconfigjava/post.yaml b/ehr/ehrconfigjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrconfigjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrconfigjava/service.yaml b/ehr/ehrconfigjava/service.yaml new file mode 100644 index 0000000..e81770e --- /dev/null +++ b/ehr/ehrconfigjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-config + name: csi-java-ehr-config + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-config + type: ClusterIP diff --git a/ehr/ehricbundlejava/Deployment.yaml b/ehr/ehricbundlejava/Deployment.yaml new file mode 100644 index 0000000..6b947c0 --- /dev/null +++ b/ehr/ehricbundlejava/Deployment.yaml @@ -0,0 +1,136 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-ic-bundle + namespace: moh-prod +spec: +# replicas: 3 + selector: + matchLabels: + app: csi-ehr-ic-bundle + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-ic-bundle + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-ic-bundle + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-icb-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-icb-password + name: ehr-database-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: SPRING_JPA_DATABASE + valueFrom: + secretKeyRef: + key: db-database + name: ehr-database-secret + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-ic-bundle + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-ic-bundle-java-sev:4.0.25.0 + imagePullPolicy: IfNotPresent + name: csi-ehr-ic-bundle + livenessProbe: + httpGet: + path: /ic/actuator/health + port: http + initialDelaySeconds: 1200 + timeoutSeconds: 30 + failureThreshold: 3 + periodSeconds: 40 + readinessProbe: + httpGet: + path: /ic/actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 150m + memory: 512Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehricbundlejava/hpa.yaml b/ehr/ehricbundlejava/hpa.yaml new file mode 100644 index 0000000..43a7c6d --- /dev/null +++ b/ehr/ehricbundlejava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-ic-bundle + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-ic-bundle # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + #- type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehricbundlejava/kustomization.yaml b/ehr/ehricbundlejava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehricbundlejava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehricbundlejava/post.yaml b/ehr/ehricbundlejava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehricbundlejava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehricbundlejava/service.yaml b/ehr/ehricbundlejava/service.yaml new file mode 100644 index 0000000..9b2fc70 --- /dev/null +++ b/ehr/ehricbundlejava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-ic-bundle + name: csi-java-ehr-ic-bundle + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-ic-bundle + type: ClusterIP diff --git a/ehr/ehricdashboardjava/Deployment.yaml b/ehr/ehricdashboardjava/Deployment.yaml new file mode 100644 index 0000000..aeaf23d --- /dev/null +++ b/ehr/ehricdashboardjava/Deployment.yaml @@ -0,0 +1,135 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-ic-dashboard + namespace: moh-prod +spec: + # replicas: 2 + selector: + matchLabels: + app: csi-ehr-ic-dashboard + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-ic-dashboard + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-ic-dashboard + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-icd-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-icd-password + name: ehr-database-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: SPRING_JPA_DATABASE + valueFrom: + secretKeyRef: + key: db-database + name: ehr-database-secret + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-ic-dashboard + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-ic-dashboard-java-sev:4.0.42.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /ic/dashboard/actuator/health + port: http + initialDelaySeconds: 600 + failureThreshold: 3 + timeoutSeconds: 10 + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /ic/dashboard/actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-ehr-ic-dashboard + resources: + limits: + memory: 2Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehricdashboardjava/hpa.yaml b/ehr/ehricdashboardjava/hpa.yaml new file mode 100644 index 0000000..4b22d3c --- /dev/null +++ b/ehr/ehricdashboardjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-ic-dashboard + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-ic-dashboard # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehricdashboardjava/kustomization.yaml b/ehr/ehricdashboardjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehricdashboardjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehricdashboardjava/post.yaml b/ehr/ehricdashboardjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehricdashboardjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehricdashboardjava/service.yaml b/ehr/ehricdashboardjava/service.yaml new file mode 100644 index 0000000..c23f34f --- /dev/null +++ b/ehr/ehricdashboardjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-ic-dashboard + name: csi-java-ehr-ic-dashboard + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-ic-dashboard + type: ClusterIP diff --git a/ehr/ehricui/Deployment.yaml b/ehr/ehricui/Deployment.yaml new file mode 100644 index 0000000..afdc58e --- /dev/null +++ b/ehr/ehricui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-ic-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-ehr-ic-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-ehr-ic-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-ic-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/ehr-ic-ui:4.0.42.0 + imagePullPolicy: IfNotPresent + name: csi-ehr-ic-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehricui/hpa.yaml b/ehr/ehricui/hpa.yaml new file mode 100644 index 0000000..f00973f --- /dev/null +++ b/ehr/ehricui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-ic-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-ic-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80 \ No newline at end of file diff --git a/ehr/ehricui/kustomization.yaml b/ehr/ehricui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/ehr/ehricui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/ehr/ehricui/post.yaml b/ehr/ehricui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehricui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehricui/service.yaml b/ehr/ehricui/service.yaml new file mode 100644 index 0000000..49e12d3 --- /dev/null +++ b/ehr/ehricui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-ehr-ic-ui-service + name: csi-ehr-ic-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-ic-ui + type: ClusterIP diff --git a/ehr/ehrintitialassessjava/Deployment.yaml b/ehr/ehrintitialassessjava/Deployment.yaml new file mode 100644 index 0000000..d4fda93 --- /dev/null +++ b/ehr/ehrintitialassessjava/Deployment.yaml @@ -0,0 +1,140 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-initialassessment + namespace: moh-prod +spec: +# replicas: 3 + selector: + matchLabels: + app: csi-ehr-initialassessment + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-initialassessment + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-initialassessment + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-ini-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-ini-password + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME + valueFrom: + configMapKeyRef: + key: db-driver + name: service-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: SPRING_JPA_HIBERNATE_DIALECT + name: service-configs + - name: HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE + valueFrom: + secretKeyRef: + key: db-database + name: ehr-database-secret + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-initialassessment + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-initialassessment-java-sev:4.1.3.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 600 + failureThreshold: 3 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-ehr-initialassessment + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehrintitialassessjava/hpa.yaml b/ehr/ehrintitialassessjava/hpa.yaml new file mode 100644 index 0000000..b50c864 --- /dev/null +++ b/ehr/ehrintitialassessjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-initialassessment + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-initialassessment # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehrintitialassessjava/kustomization.yaml b/ehr/ehrintitialassessjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrintitialassessjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrintitialassessjava/post.yaml b/ehr/ehrintitialassessjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrintitialassessjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrintitialassessjava/service.yaml b/ehr/ehrintitialassessjava/service.yaml new file mode 100644 index 0000000..f9d1807 --- /dev/null +++ b/ehr/ehrintitialassessjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-initialassessment + name: csi-java-ehr-initialassessment + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-initialassessment + type: ClusterIP diff --git a/ehr/ehripdashboardwiddotnet/Deployment.yaml b/ehr/ehripdashboardwiddotnet/Deployment.yaml new file mode 100644 index 0000000..1412fee --- /dev/null +++ b/ehr/ehripdashboardwiddotnet/Deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-ehr-dboardpc + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-net-ehr-dboardpc + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-ehr-dboardpc + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-ehr-dboardpc + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-com-ip-dashboardwidget-dotnet-sev:4.0.2.0 + imagePullPolicy: IfNotPresent + name: csi-net-ehr-dboardpc + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 3Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehripdashboardwiddotnet/hpa.yaml b/ehr/ehripdashboardwiddotnet/hpa.yaml new file mode 100644 index 0000000..0d0594d --- /dev/null +++ b/ehr/ehripdashboardwiddotnet/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-ehr-dboardpc + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-ehr-dboardpc # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehripdashboardwiddotnet/kustomization.yaml b/ehr/ehripdashboardwiddotnet/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/ehr/ehripdashboardwiddotnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/ehr/ehripdashboardwiddotnet/post.yaml b/ehr/ehripdashboardwiddotnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehripdashboardwiddotnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehripdashboardwiddotnet/service.yaml b/ehr/ehripdashboardwiddotnet/service.yaml new file mode 100644 index 0000000..113bb69 --- /dev/null +++ b/ehr/ehripdashboardwiddotnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-ehr-dboardpc + name: csi-net-ehr-dboardpc + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-ehr-dboardpc + type: ClusterIP diff --git a/ehr/ehripdischargedotnet/Deployment.yaml b/ehr/ehripdischargedotnet/Deployment.yaml new file mode 100644 index 0000000..b4e5f80 --- /dev/null +++ b/ehr/ehripdischargedotnet/Deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-ehr-ip-discharg + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-net-ehr-ip-discharg + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-ehr-ip-discharg + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-ehr-ip-discharg + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-com-ip-discharge-dotnet-sev:4.0.10.0 #4.0.9.0 #4.0.6.0 #4.0.5.0 #4.0.4.0 # 4.0.1.0 #V2.0.0.027 + imagePullPolicy: IfNotPresent + name: csi-net-ehr-ip-discharg + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehripdischargedotnet/hpa.yaml b/ehr/ehripdischargedotnet/hpa.yaml new file mode 100644 index 0000000..764f3c3 --- /dev/null +++ b/ehr/ehripdischargedotnet/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-ehr-ip-discharg + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-ehr-ip-discharg # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehripdischargedotnet/kustomization.yaml b/ehr/ehripdischargedotnet/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehripdischargedotnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehripdischargedotnet/post.yaml b/ehr/ehripdischargedotnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehripdischargedotnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehripdischargedotnet/service.yaml b/ehr/ehripdischargedotnet/service.yaml new file mode 100644 index 0000000..a974db6 --- /dev/null +++ b/ehr/ehripdischargedotnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-ehr-ip-discharg + name: csi-net-ehr-ip-discharg + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-ehr-ip-discharg + type: ClusterIP diff --git a/ehr/ehripjava/Deployment.yaml b/ehr/ehripjava/Deployment.yaml new file mode 100644 index 0000000..8da8467 --- /dev/null +++ b/ehr/ehripjava/Deployment.yaml @@ -0,0 +1,131 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-ip + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-ehr-ip + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-ip + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-ip + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-ip-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-ip-password + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME + valueFrom: + configMapKeyRef: + key: db-driver + name: service-configs + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: SPRING_JPA_HIBERNATE_DIALECT + name: service-configs + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-ip + - name: JVM_OPTS + value: "-Xms256m -Xmx4096m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx4096m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-ip-java-sev:4.1.88.7 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 1200 + timeoutSeconds: 30 + failureThreshold: 3 + periodSeconds: 40 + name: csi-ehr-ip + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + resources: + limits: + memory: 4.5Gi + requests: + cpu: 500m + memory: 512Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehripjava/hpa.yaml b/ehr/ehripjava/hpa.yaml new file mode 100644 index 0000000..3cac543 --- /dev/null +++ b/ehr/ehripjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-ip + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-ip # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehripjava/kustomization.yaml b/ehr/ehripjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehripjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehripjava/post.yaml b/ehr/ehripjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehripjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehripjava/service.yaml b/ehr/ehripjava/service.yaml new file mode 100644 index 0000000..83fcbc7 --- /dev/null +++ b/ehr/ehripjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-ip + name: csi-java-ehr-ip + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-ip + type: ClusterIP diff --git a/ehr/ehrldrjava/Deployment.yaml b/ehr/ehrldrjava/Deployment.yaml new file mode 100644 index 0000000..a43a728 --- /dev/null +++ b/ehr/ehrldrjava/Deployment.yaml @@ -0,0 +1,107 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-ldr + namespace: moh-prod +spec: + # replicas: 3 + selector: + matchLabels: + app: csi-ehr-ldr + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-ldr + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-ldr + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-ldr-username + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-ldr-password + name: ehr-database-secret + - name: hostname + value: csi-java-ehr-ldr + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-ldr-java-sev:4.0.114.0-hf1 #4.0.114.0 #4.0.97.1 #4.0.86.1 #4.0.76.0 #4.0.72.0 #4.0.70.0 #4.0.59.0 #4.0.44.2 #4.0.44.1 #4.0.27.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 1200 + timeoutSeconds: 30 + failureThreshold: 3 + periodSeconds: 40 + name: csi-ehr-ldr + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + resources: + limits: + memory: 2Gi + requests: + cpu: 150m + memory: 256Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehrldrjava/hpa.yaml b/ehr/ehrldrjava/hpa.yaml new file mode 100644 index 0000000..caddfbb --- /dev/null +++ b/ehr/ehrldrjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-ldr + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-ldr # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" +# - type: memory +# metadata: +# type: Utilization +# value: "90" \ No newline at end of file diff --git a/ehr/ehrldrjava/kustomization.yaml b/ehr/ehrldrjava/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/ehr/ehrldrjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/ehr/ehrldrjava/post.yaml b/ehr/ehrldrjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrldrjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrldrjava/service.yaml b/ehr/ehrldrjava/service.yaml new file mode 100644 index 0000000..fca6739 --- /dev/null +++ b/ehr/ehrldrjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-ldr + name: csi-java-ehr-ldr + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-ldr + type: ClusterIP diff --git a/ehr/ehrlistnerjava/Deployment.yaml b/ehr/ehrlistnerjava/Deployment.yaml new file mode 100644 index 0000000..f1e0c78 --- /dev/null +++ b/ehr/ehrlistnerjava/Deployment.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-listener + namespace: moh-prod +spec: +# replicas: 3 + selector: + matchLabels: + app: csi-ehr-listener + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-listener + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-listener + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: hostname + value: csi-java-ehr-listener + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-listener-java-sev:4.1.16.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + timeoutSeconds: 30 + failureThreshold: 3 + periodSeconds: 40 + name: csi-ehr-listener + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + resources: + limits: + memory: 1Gi + requests: + cpu: 100m + memory: 750Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehrlistnerjava/hpa.yaml b/ehr/ehrlistnerjava/hpa.yaml new file mode 100644 index 0000000..d9a6dc7 --- /dev/null +++ b/ehr/ehrlistnerjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-listener + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-listener # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehrlistnerjava/kustomization.yaml b/ehr/ehrlistnerjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrlistnerjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrlistnerjava/post.yaml b/ehr/ehrlistnerjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrlistnerjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrlistnerjava/service.yaml b/ehr/ehrlistnerjava/service.yaml new file mode 100644 index 0000000..9b9208e --- /dev/null +++ b/ehr/ehrlistnerjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-listener + name: csi-java-ehr-listener + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-listener + type: ClusterIP diff --git a/ehr/ehropdjava/Deployment.yaml b/ehr/ehropdjava/Deployment.yaml new file mode 100644 index 0000000..7b6a0b3 --- /dev/null +++ b/ehr/ehropdjava/Deployment.yaml @@ -0,0 +1,142 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-opd + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-ehr-opd + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-opd + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-opd + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-opd-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-opd-password + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME + valueFrom: + configMapKeyRef: + key: db-driver + name: service-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: SPRING_JPA_HIBERNATE_DIALECT + name: service-configs + - name: HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE + valueFrom: + secretKeyRef: + key: db-database + name: ehr-database-secret + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-opd + - name: JVM_OPTS + value: "-Xms512m -Xmx1536m" + - name: JAVA_OPTS + value: "-Xms512m -Xmx1536m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-opd-java-sev:4.1.37.1 #4.1.33.0-hf1 #4.1.33.0 #4.1.22.3 #4.1.21.0-hf1 #4.1.11.2 #4.0.59.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + timeoutSeconds: 30 + failureThreshold: 3 + periodSeconds: 40 + name: csi-ehr-opd + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + resources: + limits: + memory: 2.5Gi # Increased since 2Gi is not enough for the application + requests: + cpu: 350m + memory: 1Gi # Increased at leaset 2Gi is required for the application + imagePullSecrets: + - name: regcred + diff --git a/ehr/ehropdjava/hpa.yaml b/ehr/ehropdjava/hpa.yaml new file mode 100644 index 0000000..1505b58 --- /dev/null +++ b/ehr/ehropdjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-opd + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-opd # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehropdjava/kustomization.yaml b/ehr/ehropdjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehropdjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehropdjava/post.yaml b/ehr/ehropdjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehropdjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehropdjava/service.yaml b/ehr/ehropdjava/service.yaml new file mode 100644 index 0000000..be2cb67 --- /dev/null +++ b/ehr/ehropdjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-opd + name: csi-java-ehr-opd + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-opd + type: ClusterIP \ No newline at end of file diff --git a/ehr/ehropdmasterdotnet/Deployment.yaml b/ehr/ehropdmasterdotnet/Deployment.yaml new file mode 100644 index 0000000..bf5545e --- /dev/null +++ b/ehr/ehropdmasterdotnet/Deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-ehr-opd-master + namespace: moh-prod +spec: + # replicas: 3 + selector: + matchLabels: + app: csi-net-ehr-opd-master + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-ehr-opd-master + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-ehr-opd-master + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-com-opd-master-dotnet-sev:4.1.4.1 + imagePullPolicy: IfNotPresent + name: csi-net-ehr-opd-master + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehropdmasterdotnet/hpa.yaml b/ehr/ehropdmasterdotnet/hpa.yaml new file mode 100644 index 0000000..475ac80 --- /dev/null +++ b/ehr/ehropdmasterdotnet/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-ehr-opd-master + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-ehr-opd-master # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" diff --git a/ehr/ehropdmasterdotnet/kustomization.yaml b/ehr/ehropdmasterdotnet/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehropdmasterdotnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehropdmasterdotnet/post.yaml b/ehr/ehropdmasterdotnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehropdmasterdotnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehropdmasterdotnet/service.yaml b/ehr/ehropdmasterdotnet/service.yaml new file mode 100644 index 0000000..d39c696 --- /dev/null +++ b/ehr/ehropdmasterdotnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-ehr-opd-master + name: csi-net-ehr-opd-master + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-ehr-opd-master + type: ClusterIP diff --git a/ehr/ehropdpatientdotnet/Deployment.yaml b/ehr/ehropdpatientdotnet/Deployment.yaml new file mode 100644 index 0000000..e950e9d --- /dev/null +++ b/ehr/ehropdpatientdotnet/Deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-ehr-opd-patient + namespace: moh-prod +spec: +# replicas: 3 + selector: + matchLabels: + app: csi-net-ehr-opd-patient + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-ehr-opd-patient + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-ehr-opd-patient + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-com-opd-patient-dotnet-sev:4.0.5.1 + imagePullPolicy: IfNotPresent + name: csi-net-ehr-opd-patient + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehropdpatientdotnet/hpa.yaml b/ehr/ehropdpatientdotnet/hpa.yaml new file mode 100644 index 0000000..0d03b7c --- /dev/null +++ b/ehr/ehropdpatientdotnet/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-ehr-opd-patient + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-ehr-opd-patient # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehropdpatientdotnet/kustomization.yaml b/ehr/ehropdpatientdotnet/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehropdpatientdotnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehropdpatientdotnet/post.yaml b/ehr/ehropdpatientdotnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehropdpatientdotnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehropdpatientdotnet/service.yaml b/ehr/ehropdpatientdotnet/service.yaml new file mode 100644 index 0000000..c320589 --- /dev/null +++ b/ehr/ehropdpatientdotnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-ehr-opd-patient + name: csi-net-ehr-opd-patient + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-ehr-opd-patient + type: ClusterIP \ No newline at end of file diff --git a/ehr/ehropdui/Deployment.yaml b/ehr/ehropdui/Deployment.yaml new file mode 100644 index 0000000..689489f --- /dev/null +++ b/ehr/ehropdui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-opd-ui + namespace: moh-prod +spec: + replicas: 3 + selector: + matchLabels: + app: csi-ehr-opd-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-ehr-opd-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-opd-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/ehr-opd-ui:4.0.1824.26-hf16 + imagePullPolicy: IfNotPresent + name: csi-ehr-opd-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/ehropdui/hpa.yaml b/ehr/ehropdui/hpa.yaml new file mode 100644 index 0000000..fa2c190 --- /dev/null +++ b/ehr/ehropdui/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: cpu-csi-ehr-opd-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-ehr-opd-ui + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 1 + maxReplicaCount: 3 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/ehr/ehropdui/kustomization.yaml b/ehr/ehropdui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/ehr/ehropdui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/ehr/ehropdui/post.yaml b/ehr/ehropdui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehropdui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehropdui/service.yaml b/ehr/ehropdui/service.yaml new file mode 100644 index 0000000..f647686 --- /dev/null +++ b/ehr/ehropdui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-ehr-opd-ui-service + name: csi-ehr-opd-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-opd-ui + type: ClusterIP \ No newline at end of file diff --git a/ehr/ehroranesthesiajava/Deployment.yaml b/ehr/ehroranesthesiajava/Deployment.yaml new file mode 100644 index 0000000..e51510d --- /dev/null +++ b/ehr/ehroranesthesiajava/Deployment.yaml @@ -0,0 +1,129 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-or-anesthesia + namespace: moh-prod +spec: +# replicas: 3 + selector: + matchLabels: + app: csi-ehr-or-anesthesia + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-or-anesthesia + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-or-anesthesia + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_JPA_HIBERNATE_DDL-AUTO + value: none + - name: SPRING_JPA_HIBERNATE_DDL_AUTO + value: none + - name: SPRING_LIQUIBASE_ENABLED + value: "true" + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-or-anesthesia-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-or-anesthesia-password + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME + valueFrom: + configMapKeyRef: + key: db-driver + name: service-configs + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: SPRING_JPA_HIBERNATE_DIALECT + name: service-configs + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-or-anesthesia + - name: spring_liquibase_default_schema + valueFrom: + configMapKeyRef: + key: db-or-anesthesia-schema + name: ehr-database-configs + - name: spring_liquibase_liquibase_schema + valueFrom: + configMapKeyRef: + key: db-or-anesthesia-schema + name: ehr-database-configs + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-or-anesthesia-java-sev:4.1.46.0 + imagePullPolicy: IfNotPresent + name: csi-ehr-or-anesthesia + resources: + limits: + memory: 2Gi + requests: + cpu: 100m + memory: 750Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehroranesthesiajava/hpa.yaml b/ehr/ehroranesthesiajava/hpa.yaml new file mode 100644 index 0000000..1da6198 --- /dev/null +++ b/ehr/ehroranesthesiajava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-or-anesthesia + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-or-anesthesia # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehroranesthesiajava/kustomization.yaml b/ehr/ehroranesthesiajava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehroranesthesiajava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehroranesthesiajava/post.yaml b/ehr/ehroranesthesiajava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehroranesthesiajava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehroranesthesiajava/service.yaml b/ehr/ehroranesthesiajava/service.yaml new file mode 100644 index 0000000..f9b5aed --- /dev/null +++ b/ehr/ehroranesthesiajava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-or-anesthesia + name: csi-java-ehr-or-anesthesia + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-or-anesthesia + type: ClusterIP diff --git a/ehr/ehrorbookingjava/Deployment.yaml b/ehr/ehrorbookingjava/Deployment.yaml new file mode 100644 index 0000000..7357b91 --- /dev/null +++ b/ehr/ehrorbookingjava/Deployment.yaml @@ -0,0 +1,130 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-or-booking + namespace: moh-prod +spec: +# replicas: 3 + selector: + matchLabels: + app: csi-ehr-or-booking + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-or-booking + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-or-booking + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_JPA_HIBERNATE_DDL-AUTO + value: none + - name: SPRING_JPA_HIBERNATE_DDL_AUTO + value: none + - name: SPRING_LIQUIBASE_ENABLED + value: "true" + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-or-booking-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-or-booking-password + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME + valueFrom: + configMapKeyRef: + key: db-driver + name: service-configs + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: SPRING_JPA_HIBERNATE_DIALECT + name: service-configs + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-or-booking + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-or-booking-java-sev:4.0.128.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /OR/actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + name: csi-ehr-or-booking + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 200m + memory: 512Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehrorbookingjava/hpa.yaml b/ehr/ehrorbookingjava/hpa.yaml new file mode 100644 index 0000000..941fa80 --- /dev/null +++ b/ehr/ehrorbookingjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-or-booking + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-or-booking # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehrorbookingjava/kustomization.yaml b/ehr/ehrorbookingjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrorbookingjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrorbookingjava/post.yaml b/ehr/ehrorbookingjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrorbookingjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrorbookingjava/service.yaml b/ehr/ehrorbookingjava/service.yaml new file mode 100644 index 0000000..5773107 --- /dev/null +++ b/ehr/ehrorbookingjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-or-booking + name: csi-java-ehr-or-booking + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-or-booking + type: ClusterIP \ No newline at end of file diff --git a/ehr/ehrorbookjava/Deployment.yaml b/ehr/ehrorbookjava/Deployment.yaml new file mode 100644 index 0000000..881c94b --- /dev/null +++ b/ehr/ehrorbookjava/Deployment.yaml @@ -0,0 +1,107 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-java-ehr-or-book + namespace: moh-prod +spec: +# replicas: 3 + selector: + matchLabels: + app: csi-java-ehr-or-book + tier: backend + track: stable + template: + metadata: + labels: + app: csi-java-ehr-or-book + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-java-ehr-or-book + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + # - name: SPRING_JPA_HIBERNATE_DDL-AUTO + # value: none + # - name: SPRING_JPA_HIBERNATE_DDL_AUTO + # value: none + # - name: SPRING_LIQUIBASE_ENABLED + # value: "true" + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-or-book-username + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-or-book-password + name: ehr-database-secret + - name: SPRING_jpa_properties_hibernate_temp_use_jdbc_metadata_defaults + value: 'true' + - name: hostname + value: csi-java-ehr-or-book + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-or-book-java-sev:4.0.93.0-hf1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + name: csi-java-ehr-or-book + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 4Gi + requests: + cpu: 100m + memory: 1Gi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehrorbookjava/hpa.yaml b/ehr/ehrorbookjava/hpa.yaml new file mode 100644 index 0000000..29ec244 --- /dev/null +++ b/ehr/ehrorbookjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-java-ehr-or-book + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-java-ehr-or-book # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/ehr/ehrorbookjava/kustomization.yaml b/ehr/ehrorbookjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrorbookjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrorbookjava/post.yaml b/ehr/ehrorbookjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrorbookjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrorbookjava/service.yaml b/ehr/ehrorbookjava/service.yaml new file mode 100644 index 0000000..90f46a6 --- /dev/null +++ b/ehr/ehrorbookjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-or-book + name: csi-java-ehr-or-book + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-java-ehr-or-book + type: ClusterIP \ No newline at end of file diff --git a/ehr/ehrpomrjava/Deployment.yaml b/ehr/ehrpomrjava/Deployment.yaml new file mode 100644 index 0000000..266b51c --- /dev/null +++ b/ehr/ehrpomrjava/Deployment.yaml @@ -0,0 +1,139 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-opd-patient-pomr + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-opd-patient-pomr + tier: backend + track: stable + template: + metadata: + labels: + app: csi-opd-patient-pomr + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-opd-patient-pomr + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-pom-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-pom-password + name: ehr-database-secret + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: SPRING_JPA_HIBERNATE_DIALECT + name: service-configs + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-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: SPRING_JPA_DATABASE + valueFrom: + secretKeyRef: + key: db-database + name: ehr-database-secret + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-patient-pomr + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-opd-patient-pomr-java-sev:4.1.19.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + timeoutSeconds: 30 + failureThreshold: 3 + periodSeconds: 40 + name: csi-opd-patient-pomr + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 30 + failureThreshold: 3 + periodSeconds: 40 + resources: + limits: + memory: 2Gi + requests: + cpu: 250m + memory: 1Gi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehrpomrjava/hpa.yaml b/ehr/ehrpomrjava/hpa.yaml new file mode 100644 index 0000000..0a89a96 --- /dev/null +++ b/ehr/ehrpomrjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-opd-patient-pomr + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-opd-patient-pomr # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehrpomrjava/kustomization.yaml b/ehr/ehrpomrjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrpomrjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrpomrjava/post.yaml b/ehr/ehrpomrjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrpomrjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrpomrjava/service.yaml b/ehr/ehrpomrjava/service.yaml new file mode 100644 index 0000000..d1d5f0f --- /dev/null +++ b/ehr/ehrpomrjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-patient-pomr + name: csi-java-ehr-patient-pomr + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-opd-patient-pomr + type: ClusterIP diff --git a/ehr/ehrreportgeneratorjava/Deployment.yaml b/ehr/ehrreportgeneratorjava/Deployment.yaml new file mode 100644 index 0000000..7403249 --- /dev/null +++ b/ehr/ehrreportgeneratorjava/Deployment.yaml @@ -0,0 +1,122 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-common-report-generator-java-sev + namespace: moh-prod +spec: + # replicas: 2 + selector: + matchLabels: + app: csi-ehr-common-report-generator-java-sev + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-common-report-generator-java-sev + tier: backend + track: stable + spec: + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-rep-username + name: ehr-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-rep-password + name: ehr-database-secret + - name: SPRING_DATASOURCE_driver_class_name + valueFrom: + configMapKeyRef: + key: db-driver + name: service-configs + - name: KAFKA_BOOTSTRAP_SERVERS + valueFrom: + configMapKeyRef: + key: KAFKA_BOOTSTRAP-SERVERS + name: service-configs + - name: KAFKA_ELK_TOPIC + valueFrom: + configMapKeyRef: + key: KAFKA_ELK_TOPIC + name: service-configs + - name: SPRING_JPA_HIBERNATE_DDL_AUTO + value: update + - name: hostname + value: csi-java-ehr-common-report-generator + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-common-report-generator-java-sev:4.0.6.0 #4.0.5.0 #4.0.3.1 #4.0.3.0 #V2.0.12.0 #V2.0.11.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-ehr-common-report-generator-java-sev + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + resources: + limits: + memory: 1Gi + requests: + cpu: 50m + memory: 256Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehrreportgeneratorjava/hpa.yaml b/ehr/ehrreportgeneratorjava/hpa.yaml new file mode 100644 index 0000000..927da84 --- /dev/null +++ b/ehr/ehrreportgeneratorjava/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-common-report-generator-java-sev + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-ehr-common-report-generator-java-sev + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 3 + maxReplicaCount: 4 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" \ No newline at end of file diff --git a/ehr/ehrreportgeneratorjava/kustomization.yaml b/ehr/ehrreportgeneratorjava/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/ehr/ehrreportgeneratorjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/ehr/ehrreportgeneratorjava/post.yaml b/ehr/ehrreportgeneratorjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrreportgeneratorjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrreportgeneratorjava/service.yaml b/ehr/ehrreportgeneratorjava/service.yaml new file mode 100644 index 0000000..2cee4ee --- /dev/null +++ b/ehr/ehrreportgeneratorjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-common-report-generator + name: csi-java-ehr-common-report-generator + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-common-report-generator-java-sev + type: ClusterIP \ No newline at end of file diff --git a/ehr/ehrschedulerjava/Deployment.yaml b/ehr/ehrschedulerjava/Deployment.yaml new file mode 100644 index 0000000..505713e --- /dev/null +++ b/ehr/ehrschedulerjava/Deployment.yaml @@ -0,0 +1,150 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-common-scheduler + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-ehr-common-scheduler + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-common-scheduler + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-common-scheduler + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-common-scheduler + - name: KAFKA_BOOTSTRAP_SERVERS + valueFrom: + configMapKeyRef: + key: KAFKA_BOOTSTRAP_SERVERS + name: service-configs + - name: KAFKA_ELK_TOPIC + valueFrom: + configMapKeyRef: + key: KAFKA_ELK_TOPIC + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_SECOND-DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-ip-username + name: ehr-database-secret + - name: SPRING_SECOND-DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-ip-username + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-ip-password + name: ehr-database-secret + - name: SPRING_SECOND-DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-ip-password + name: ehr-database-secret + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-common-scheduler-java-sev:4.1.14.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-ehr-common-scheduler + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + resources: + limits: + memory: 2Gi + requests: + cpu: 100m + memory: 512Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehrschedulerjava/hpa.yaml b/ehr/ehrschedulerjava/hpa.yaml new file mode 100644 index 0000000..6361a63 --- /dev/null +++ b/ehr/ehrschedulerjava/hpa.yaml @@ -0,0 +1,19 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-common-scheduler + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-ehr-common-scheduler + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 1 + maxReplicaCount: 2 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" \ No newline at end of file diff --git a/ehr/ehrschedulerjava/kustomization.yaml b/ehr/ehrschedulerjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrschedulerjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrschedulerjava/post.yaml b/ehr/ehrschedulerjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrschedulerjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrschedulerjava/service.yaml b/ehr/ehrschedulerjava/service.yaml new file mode 100644 index 0000000..1ff19d9 --- /dev/null +++ b/ehr/ehrschedulerjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-common-scheduler + name: csi-java-ehr-common-scheduler + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-common-scheduler + type: ClusterIP diff --git a/ehr/ehrspecializedclinicjava/Deployment.yaml b/ehr/ehrspecializedclinicjava/Deployment.yaml new file mode 100644 index 0000000..ee5b91a --- /dev/null +++ b/ehr/ehrspecializedclinicjava/Deployment.yaml @@ -0,0 +1,111 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-specializedclinic + namespace: moh-prod +spec: + # replicas: 3 + selector: + matchLabels: + app: csi-ehr-specializedclinic + tier: backend + track: stable + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: csi-ehr-specializedclinic + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-specializedclinic + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: db-spe-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-spe-username + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-spe-password + name: ehr-database-secret + - name: hostname + value: csi-java-ehr-specializedclinic + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-specialized-clinic-java-sev:4.0.105.0 #4.0.95.0 #4.0.89.2 #V1.0.59 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + name: csi-ehr-specializedclinic + ports: + - containerPort: 80 + name: http + protocol: TCP + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + resources: + limits: + memory: 2Gi + requests: + cpu: 100m + memory: 750Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehrspecializedclinicjava/hpa.yaml b/ehr/ehrspecializedclinicjava/hpa.yaml new file mode 100644 index 0000000..0c12ee6 --- /dev/null +++ b/ehr/ehrspecializedclinicjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-specializedclinic + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-specializedclinic # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehrspecializedclinicjava/kustomization.yaml b/ehr/ehrspecializedclinicjava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrspecializedclinicjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrspecializedclinicjava/post.yaml b/ehr/ehrspecializedclinicjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrspecializedclinicjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrspecializedclinicjava/service.yaml b/ehr/ehrspecializedclinicjava/service.yaml new file mode 100644 index 0000000..dfc58e2 --- /dev/null +++ b/ehr/ehrspecializedclinicjava/service.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-specializedclinic + name: csi-java-ehr-specializedclinic + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-specializedclinic + sessionAffinity: None + type: ClusterIP diff --git a/ehr/ehrtemplatejava/Deployment.yaml b/ehr/ehrtemplatejava/Deployment.yaml new file mode 100644 index 0000000..d5501de --- /dev/null +++ b/ehr/ehrtemplatejava/Deployment.yaml @@ -0,0 +1,106 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-template + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-ehr-template + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ehr-template + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-template + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: ehr-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-tem-username + name: ehr-database-secret + - name: SPRING_JPA_HIBERNATE_DIALECT + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_JPA_DATABASE-PLATFORM + valueFrom: + configMapKeyRef: + key: db-dialect + name: service-configs + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-tem-password + name: ehr-database-secret + - name: hostname + value: csi-java-ehr-template + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ehr-template-java-sev:4.1.8.0 #4.1.6.0 #4.1.5.1 #4.1.4.0 #4.1.2.1 #4.0.18.0 #4.0.16.0 #4.0.12.0 #4.0.6.1 #4.0.5.0 #4.0.4.1 #4.0.3.1-hf1 #4.0.3.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + timeoutSeconds: 30 + failureThreshold: 3 + periodSeconds: 40 + name: csi-ehr-template + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 3Gi + requests: + cpu: 500m + memory: 750Mi + imagePullSecrets: + - name: regcred diff --git a/ehr/ehrtemplatejava/hpa.yaml b/ehr/ehrtemplatejava/hpa.yaml new file mode 100644 index 0000000..8d008b1 --- /dev/null +++ b/ehr/ehrtemplatejava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-template + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-template # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/ehr/ehrtemplatejava/kustomization.yaml b/ehr/ehrtemplatejava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/ehrtemplatejava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/ehrtemplatejava/post.yaml b/ehr/ehrtemplatejava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/ehrtemplatejava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/ehrtemplatejava/service.yaml b/ehr/ehrtemplatejava/service.yaml new file mode 100644 index 0000000..fb7a805 --- /dev/null +++ b/ehr/ehrtemplatejava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-template + name: csi-java-ehr-template + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-template + type: ClusterIP \ No newline at end of file diff --git a/ehr/workflow/Deployment.yaml b/ehr/workflow/Deployment.yaml new file mode 100644 index 0000000..b039fa9 --- /dev/null +++ b/ehr/workflow/Deployment.yaml @@ -0,0 +1,104 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-workflow-automation + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-workflow-automation + tier: backend + track: stable + template: + metadata: + labels: + app: csi-workflow-automation + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-workflow-automation + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: SPRING_DATA_MONGODB_URI + valueFrom: + configMapKeyRef: + key: EHR_WORKFLOW_MONGO_URI + name: ehr-database-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + 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: SPRING_JPA_DATABASE + valueFrom: + secretKeyRef: + key: db-database + name: ehr-database-secret + - name: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-workflow-automation + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-workflow-automation-service-java-sev:4.0.53.0 + imagePullPolicy: IfNotPresent + name: csi-ehr-common + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 100m + memory: 512Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/ehr/workflow/hpa.yaml b/ehr/workflow/hpa.yaml new file mode 100644 index 0000000..370b2cb --- /dev/null +++ b/ehr/workflow/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-workflow-automation + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-workflow-automation # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/ehr/workflow/kustomization.yaml b/ehr/workflow/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/ehr/workflow/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/ehr/workflow/post.yaml b/ehr/workflow/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/ehr/workflow/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/ehr/workflow/service.yaml b/ehr/workflow/service.yaml new file mode 100644 index 0000000..2d95b40 --- /dev/null +++ b/ehr/workflow/service.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-workflow-automation + name: csi-java-workflow-automation + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-workflow-automation + type: ClusterIP + diff --git a/empi/csi-empi-api/Deployment.yaml b/empi/csi-empi-api/Deployment.yaml new file mode 100644 index 0000000..9cad07a --- /dev/null +++ b/empi/csi-empi-api/Deployment.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-empi-api + namespace: csi-perf +spec: + #replicas: 4 + selector: + matchLabels: + app: csi-empi-api + tier: backend + track: stable + template: + metadata: + labels: + app: csi-empi-api + module: empi + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-empi-api + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: JAVA_OPTS + value: "-Xms3072m -Xmx3072m" + - name: JVM_OPTS + value: '-XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=70 -XX:CompressedClassSpaceSize=64m -XX:ReservedCodeCacheSize=64m -XX:MaxMetaspaceSize=256m -Xms3072m -Xmx3072m -XX:MaxRAMPercentage=70' + - name: hostname + value: csi-empi-api + envFrom: + - configMapRef: + name: service-configs-empi-api + - secretRef: + name: service-secret-empi-api + - configMapRef: + name: service-configs + image: registry.cloudsolutions.com.sa/vida-qa/csi-empi-api:0.9 + name: csi-empi-api + livenessProbe: + httpGet: + path: /api/actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /api/actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 4Gi + cpu: 2000m + requests: + cpu: 500m + memory: 3Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/empi/csi-empi-api/hpa.yaml b/empi/csi-empi-api/hpa.yaml new file mode 100644 index 0000000..6548336 --- /dev/null +++ b/empi/csi-empi-api/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-empi-api + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-empi-api # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: AverageValue + # value: "2500Mi" \ No newline at end of file diff --git a/empi/csi-empi-api/kustomization.yaml b/empi/csi-empi-api/kustomization.yaml new file mode 100644 index 0000000..9be6ac0 --- /dev/null +++ b/empi/csi-empi-api/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- hpa.yaml +- Deployment.yaml \ No newline at end of file diff --git a/empi/csi-empi-api/post.yaml b/empi/csi-empi-api/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/empi/csi-empi-api/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/empi/csi-empi-api/service.yaml b/empi/csi-empi-api/service.yaml new file mode 100644 index 0000000..472e414 --- /dev/null +++ b/empi/csi-empi-api/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-empi-api + name: csi-empi-api + namespace: csi-perf +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-empi-api + type: ClusterIP \ No newline at end of file diff --git a/empi/csi-empi-wrapper/Deployment.yaml b/empi/csi-empi-wrapper/Deployment.yaml new file mode 100644 index 0000000..4ee4c77 --- /dev/null +++ b/empi/csi-empi-wrapper/Deployment.yaml @@ -0,0 +1,72 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: dev-empi-wrapper + name: csi-empi-wrapper + namespace: csi-perf +spec: + #replicas: 4 + selector: + matchLabels: + app: csi-empi-wrapper + tier: backend + track: stable + template: + metadata: + labels: + app: csi-empi-wrapper + module: empi + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-empi-wrapper + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: hostname + value: csi-empi-wrapper + - name: JAVA_OPTS + value: "-Xms2048m -Xmx2048m" + - name: JVM_OPTS + value: "-Xms2048m -Xmx2048m" + envFrom: + - configMapRef: + name: service-configs-empi-wrapper + - configMapRef: + name: service-configs + image: registry.cloudsolutions.com.sa/vida-qa/csi-empi-wrapper:dev_rel_1_prod + name: csi-empi-wrapper + livenessProbe: + httpGet: + path: /api/actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /api/actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2.5Gi + requests: + cpu: 100m + memory: 2.5Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/empi/csi-empi-wrapper/hpa.yaml b/empi/csi-empi-wrapper/hpa.yaml new file mode 100644 index 0000000..fa3f01d --- /dev/null +++ b/empi/csi-empi-wrapper/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-empi-wrapper + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-empi-wrapper # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: AverageValue + # value: "2500Mi" \ No newline at end of file diff --git a/empi/csi-empi-wrapper/kustomization.yaml b/empi/csi-empi-wrapper/kustomization.yaml new file mode 100644 index 0000000..9be6ac0 --- /dev/null +++ b/empi/csi-empi-wrapper/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- hpa.yaml +- Deployment.yaml \ No newline at end of file diff --git a/empi/csi-empi-wrapper/post.yaml b/empi/csi-empi-wrapper/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/empi/csi-empi-wrapper/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/empi/csi-empi-wrapper/service.yaml b/empi/csi-empi-wrapper/service.yaml new file mode 100644 index 0000000..e4b35f5 --- /dev/null +++ b/empi/csi-empi-wrapper/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-empi-wrapper + name: csi-empi-wrapper + namespace: csi-perf +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-empi-wrapper + type: ClusterIP \ No newline at end of file diff --git a/empi/empi-wrappers/kustomization.yaml b/empi/empi-wrappers/kustomization.yaml new file mode 100644 index 0000000..aba8701 --- /dev/null +++ b/empi/empi-wrappers/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- nginx-empicrs-proxy.yaml +- nginx-empihijridte-proxy.yaml +- nginx-empiread-proxy.yaml +- nginx-empiwrit-proxy.yaml diff --git a/empi/empi-wrappers/nginx-empicrs-proxy.yaml b/empi/empi-wrappers/nginx-empicrs-proxy.yaml new file mode 100644 index 0000000..3460f41 --- /dev/null +++ b/empi/empi-wrappers/nginx-empicrs-proxy.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-empicrs-proxy + labels: + app: nginx-empicrs-proxy +spec: + replicas: 1 + selector: + matchLabels: + app: nginx-empicrs-proxy + template: + metadata: + labels: + app: nginx-empicrs-proxy + spec: + containers: + - name: nginx-empicrs-proxy + image: registry.cloudsolutions.com.sa/vida-prod/nginx:latest + ports: + - containerPort: 80 + volumeMounts: + - name: nginx-config + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + imagePullSecrets: + - name: regcred + volumes: + - name: nginx-config + configMap: + name: empicrs-nginx-configmap + items: + - key: nginx.conf + path: nginx.conf \ No newline at end of file diff --git a/empi/empi-wrappers/nginx-empihijridte-proxy.yaml b/empi/empi-wrappers/nginx-empihijridte-proxy.yaml new file mode 100644 index 0000000..bf91453 --- /dev/null +++ b/empi/empi-wrappers/nginx-empihijridte-proxy.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-empihijridte-proxy + labels: + app: nginx-empihijridte-proxy +spec: + replicas: 1 + selector: + matchLabels: + app: nginx-empihijridte-proxy + template: + metadata: + labels: + app: nginx-empihijridte-proxy + spec: + containers: + - name: nginx-empihijridte-proxy + image: registry.cloudsolutions.com.sa/vida-prod/nginx:latest + ports: + - containerPort: 80 + volumeMounts: + - name: nginx-config + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + imagePullSecrets: + - name: regcred + volumes: + - name: nginx-config + configMap: + name: empihijridte-nginx-configmap + items: + - key: nginx.conf + path: nginx.conf \ No newline at end of file diff --git a/empi/empi-wrappers/nginx-empiread-proxy.yaml b/empi/empi-wrappers/nginx-empiread-proxy.yaml new file mode 100644 index 0000000..8bd9665 --- /dev/null +++ b/empi/empi-wrappers/nginx-empiread-proxy.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-empiread-proxy + labels: + app: nginx-empiread-proxy +spec: + replicas: 1 + selector: + matchLabels: + app: nginx-empiread-proxy + template: + metadata: + labels: + app: nginx-empiread-proxy + spec: + containers: + - name: nginx-empiread-proxy + image: registry.cloudsolutions.com.sa/vida-prod/nginx:latest + ports: + - containerPort: 80 + volumeMounts: + - name: nginx-config + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + imagePullSecrets: + - name: regcred + volumes: + - name: nginx-config + configMap: + name: empiread-nginx-configmap + items: + - key: nginx.conf + path: nginx.conf \ No newline at end of file diff --git a/empi/empi-wrappers/nginx-empiwrit-proxy.yaml b/empi/empi-wrappers/nginx-empiwrit-proxy.yaml new file mode 100644 index 0000000..4424d42 --- /dev/null +++ b/empi/empi-wrappers/nginx-empiwrit-proxy.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-empiwrit-proxy + labels: + app: nginx-empiwrit-proxy +spec: + replicas: 1 + selector: + matchLabels: + app: nginx-empiwrit-proxy + template: + metadata: + labels: + app: nginx-empiwrit-proxy + spec: + containers: + - name: nginx-empiwrit-proxy + image: registry.cloudsolutions.com.sa/vida-prod/nginx:latest + ports: + - containerPort: 80 + volumeMounts: + - name: nginx-config + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + imagePullSecrets: + - name: regcred + volumes: + - name: nginx-config + configMap: + name: empiwrit-nginx-configmap + items: + - key: nginx.conf + path: nginx.conf \ No newline at end of file diff --git a/empi/empicrsintegration/Deployment.yaml b/empi/empicrsintegration/Deployment.yaml new file mode 100644 index 0000000..07530cb --- /dev/null +++ b/empi/empicrsintegration/Deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-empi-crs-inte + namespace: vidamoh +spec: + selector: + matchLabels: + app: csi-net-empi-crs-inte + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-empi-crs-inte + module: empi + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-empi-crs-integration:4.2.1.0 + imagePullPolicy: IfNotPresent + name: csi-net-empi-crs-inte + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred + diff --git a/empi/empicrsintegration/kustomization.yaml b/empi/empicrsintegration/kustomization.yaml new file mode 100644 index 0000000..915ed1b --- /dev/null +++ b/empi/empicrsintegration/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml diff --git a/empi/empicrsintegration/post.yaml b/empi/empicrsintegration/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/empi/empicrsintegration/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/empi/empicrsintegration/service.yaml b/empi/empicrsintegration/service.yaml new file mode 100644 index 0000000..7a0095c --- /dev/null +++ b/empi/empicrsintegration/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-empi-crs-inte + name: csi-net-empi-crs-inte + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-empi-crs-inte + type: ClusterIP diff --git a/empi/empihijridatedotnet/Deployment.yaml b/empi/empihijridatedotnet/Deployment.yaml new file mode 100644 index 0000000..898754d --- /dev/null +++ b/empi/empihijridatedotnet/Deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-empi-hijridte + namespace: moh-prod +spec: + replicas: 2 + selector: + matchLabels: + app: csi-net-empi-hijridte + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-empi-hijridte + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-empi-hijridate-service:4.1.0.0 + name: csi-net-empi-hijridte + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/empi/empihijridatedotnet/hpa.yaml b/empi/empihijridatedotnet/hpa.yaml new file mode 100644 index 0000000..285e1aa --- /dev/null +++ b/empi/empihijridatedotnet/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-empi-hijridte + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-empi-hijridte # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/empi/empihijridatedotnet/kustomization.yaml b/empi/empihijridatedotnet/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/empi/empihijridatedotnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/empi/empihijridatedotnet/post.yaml b/empi/empihijridatedotnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/empi/empihijridatedotnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/empi/empihijridatedotnet/service.yaml b/empi/empihijridatedotnet/service.yaml new file mode 100644 index 0000000..7818723 --- /dev/null +++ b/empi/empihijridatedotnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-empi-hijridte + name: csi-net-empi-hijridte + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-empi-hijridte + type: ClusterIP diff --git a/empi/empireaddotnet/Deployment.yaml b/empi/empireaddotnet/Deployment.yaml new file mode 100644 index 0000000..4ad7896 --- /dev/null +++ b/empi/empireaddotnet/Deployment.yaml @@ -0,0 +1,70 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-empiread + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-net-empiread + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-empiread + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-empiread + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-empi-patient-service-read:4.2.4.0 + name: csi-net-empiread + readinessProbe: + httpGet: # make an HTTP request + path: /health/ready # endpoint to hit + port: 80 # port to use + initialDelaySeconds: 30 # how long to wait before checking + failureThreshold: 10 # how many failures to accept before failing + periodSeconds: 20 # how long to wait between checks + livenessProbe: + httpGet: + path: /health/live + port: 80 + initialDelaySeconds: 60 + failureThreshold: 10 + periodSeconds: 30 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 6Gi + requests: + cpu: 150m + memory: 1Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/empi/empireaddotnet/hpa.yaml b/empi/empireaddotnet/hpa.yaml new file mode 100644 index 0000000..2af88f2 --- /dev/null +++ b/empi/empireaddotnet/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-empiread + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-empiread # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: AverageValue + # value: "2500Mi" \ No newline at end of file diff --git a/empi/empireaddotnet/kustomization.yaml b/empi/empireaddotnet/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/empi/empireaddotnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/empi/empireaddotnet/post.yaml b/empi/empireaddotnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/empi/empireaddotnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/empi/empireaddotnet/service.yaml b/empi/empireaddotnet/service.yaml new file mode 100644 index 0000000..ab4e81e --- /dev/null +++ b/empi/empireaddotnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-empiread + name: csi-net-empiread + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-empiread + type: ClusterIP \ No newline at end of file diff --git a/empi/empiui/Deployment.yaml b/empi/empiui/Deployment.yaml new file mode 100644 index 0000000..f4dc891 --- /dev/null +++ b/empi/empiui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-empi-ui + namespace: moh-prod +spec: + replicas: 3 + selector: + matchLabels: + app: csi-empi-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-empi-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-empi-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/empi-ui:4.0.27.0 + imagePullPolicy: IfNotPresent + name: csi-empi-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/empi/empiui/hpa.yaml b/empi/empiui/hpa.yaml new file mode 100644 index 0000000..7becf7a --- /dev/null +++ b/empi/empiui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-empi-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-empi-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/empi/empiui/kustomization.yaml b/empi/empiui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/empi/empiui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/empi/empiui/post.yaml b/empi/empiui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/empi/empiui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/empi/empiui/service.yaml b/empi/empiui/service.yaml new file mode 100644 index 0000000..e6af153 --- /dev/null +++ b/empi/empiui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-empi-ui-service + name: csi-empi-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-empi-ui + type: ClusterIP \ No newline at end of file diff --git a/empi/empiwritedotnet/Deployment.yaml b/empi/empiwritedotnet/Deployment.yaml new file mode 100644 index 0000000..364e892 --- /dev/null +++ b/empi/empiwritedotnet/Deployment.yaml @@ -0,0 +1,70 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-empiwrit + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-net-empiwrit + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-empiwrit + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-empiwrit + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-empi-patient-registration-srv:4.2.13.0-hf2 + name: csi-net-empiwrit + readinessProbe: + httpGet: # make an HTTP request + path: /health/ready # endpoint to hit + port: 80 # port to use + initialDelaySeconds: 30 # how long to wait before checking + failureThreshold: 10 # how many failures to accept before failing + periodSeconds: 20 # how long to wait between checks + livenessProbe: + httpGet: + path: /health/live + port: 80 + initialDelaySeconds: 60 + failureThreshold: 10 + periodSeconds: 30 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 4Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/empi/empiwritedotnet/hpa.yaml b/empi/empiwritedotnet/hpa.yaml new file mode 100644 index 0000000..26fb9a0 --- /dev/null +++ b/empi/empiwritedotnet/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-empiwrit + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-empiwrit # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" +# - type: memory +# metadata: +# type: Utilization +# value: "80" \ No newline at end of file diff --git a/empi/empiwritedotnet/kustomization.yaml b/empi/empiwritedotnet/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/empi/empiwritedotnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/empi/empiwritedotnet/post.yaml b/empi/empiwritedotnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/empi/empiwritedotnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/empi/empiwritedotnet/service.yaml b/empi/empiwritedotnet/service.yaml new file mode 100644 index 0000000..82f76c3 --- /dev/null +++ b/empi/empiwritedotnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-empiwrit + name: csi-net-empiwrit + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-empiwrit + type: ClusterIP diff --git a/er/ehrerui/Deployment.yaml b/er/ehrerui/Deployment.yaml new file mode 100644 index 0000000..741853a --- /dev/null +++ b/er/ehrerui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ehr-er-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-ehr-er-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-ehr-er-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ehr-er-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/ehr-er-ui:4.1.19.22-hf2 + imagePullPolicy: IfNotPresent + name: csi-ehr-er-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/er/ehrerui/hpa.yaml b/er/ehrerui/hpa.yaml new file mode 100644 index 0000000..7dcfee2 --- /dev/null +++ b/er/ehrerui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ehr-er-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ehr-er-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/er/ehrerui/kustomization.yaml b/er/ehrerui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/er/ehrerui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/er/ehrerui/post.yaml b/er/ehrerui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/er/ehrerui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/er/ehrerui/service.yaml b/er/ehrerui/service.yaml new file mode 100644 index 0000000..f0574af --- /dev/null +++ b/er/ehrerui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-ehr-er-ui-service + name: csi-ehr-er-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ehr-er-ui + type: ClusterIP \ No newline at end of file diff --git a/er/erfunctiondotnet/Deployment.yaml b/er/erfunctiondotnet/Deployment.yaml new file mode 100644 index 0000000..8c227b1 --- /dev/null +++ b/er/erfunctiondotnet/Deployment.yaml @@ -0,0 +1,71 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-erfuncti + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-net-erfuncti + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-erfuncti + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-erfuncti + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-ehr-er-functions-dotnet-sev:4.1.14.5 + name: csi-ehr-er-functions-dotnet-sev + readinessProbe: + httpGet: # make an HTTP request + path: /health/ready # endpoint to hit + port: 80 # port to use + initialDelaySeconds: 30 # how long to wait before checking + failureThreshold: 10 # how many failures to accept before failing + periodSeconds: 20 # how long to wait between checks + livenessProbe: + httpGet: + path: /health/live + port: 80 + initialDelaySeconds: 60 + failureThreshold: 10 + periodSeconds: 30 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 6Gi + requests: + cpu: 300m + memory: 1500Mi + imagePullSecrets: + - name: regcred + + diff --git a/er/erfunctiondotnet/hpa.yaml b/er/erfunctiondotnet/hpa.yaml new file mode 100644 index 0000000..56e98c7 --- /dev/null +++ b/er/erfunctiondotnet/hpa.yaml @@ -0,0 +1,24 @@ + +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-erfuncti + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-erfuncti # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/er/erfunctiondotnet/kustomization.yaml b/er/erfunctiondotnet/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/er/erfunctiondotnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/er/erfunctiondotnet/post.yaml b/er/erfunctiondotnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/er/erfunctiondotnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/er/erfunctiondotnet/service.yaml b/er/erfunctiondotnet/service.yaml new file mode 100644 index 0000000..f3dad34 --- /dev/null +++ b/er/erfunctiondotnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-erfuncti + name: csi-net-erfuncti + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-erfuncti + type: ClusterIP diff --git a/hhc/hhcservice/Deployment.yaml b/hhc/hhcservice/Deployment.yaml new file mode 100644 index 0000000..9ce6b98 --- /dev/null +++ b/hhc/hhcservice/Deployment.yaml @@ -0,0 +1,54 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-hhc + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-net-hhc + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-hhc + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-hhc + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + value: net-moh-prod + - name: VERSION + value: '0.0.4-alpha.3' + envFrom: + - configMapRef: + name: hhc-config + image: harbor.moh.gov.sa/vidamoh/hhc-service:4.0.0.4-beta77 + imagePullPolicy: IfNotPresent + name: csi-net-hhc + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 250m + memory: 394Mi + imagePullSecrets: + - name: regcred diff --git a/hhc/hhcservice/hpa.yaml b/hhc/hhcservice/hpa.yaml new file mode 100644 index 0000000..ba3147b --- /dev/null +++ b/hhc/hhcservice/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-hhc + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-hhc # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "10" \ No newline at end of file diff --git a/hhc/hhcservice/kustomization.yaml b/hhc/hhcservice/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/hhc/hhcservice/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/hhc/hhcservice/post.yaml b/hhc/hhcservice/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/hhc/hhcservice/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/hhc/hhcservice/service.yaml b/hhc/hhcservice/service.yaml new file mode 100644 index 0000000..4ee88c3 --- /dev/null +++ b/hhc/hhcservice/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-hhc + name: csi-net-hhc + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-hhc + type: ClusterIP diff --git a/hhc/hhcui/Deployment.yaml b/hhc/hhcui/Deployment.yaml new file mode 100644 index 0000000..f90d172 --- /dev/null +++ b/hhc/hhcui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-hhc-ui + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-hhc-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-hhc-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-hhc-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: 'harbor.moh.gov.sa/vidamoh/hhc-ui:0.0.8-alpha.204' + imagePullPolicy: IfNotPresent + name: csi-hhc-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 25m + memory: 23Mi + imagePullSecrets: + - name: regcred diff --git a/hhc/hhcui/kustomization.yaml b/hhc/hhcui/kustomization.yaml new file mode 100644 index 0000000..915ed1b --- /dev/null +++ b/hhc/hhcui/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml diff --git a/hhc/hhcui/post.yaml b/hhc/hhcui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/hhc/hhcui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/hhc/hhcui/service.yaml b/hhc/hhcui/service.yaml new file mode 100644 index 0000000..853a200 --- /dev/null +++ b/hhc/hhcui/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-hhc-ui-service + name: csi-hhc-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-hhc-ui + type: ClusterIP diff --git a/him/csi-him-ui/Deployment.yaml b/him/csi-him-ui/Deployment.yaml new file mode 100644 index 0000000..6123e87 --- /dev/null +++ b/him/csi-him-ui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-him-ui + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-him-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-him-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-him-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/him-ui:4.1.177.9 + imagePullPolicy: IfNotPresent + name: csi-him-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/him/csi-him-ui/hpa.yaml b/him/csi-him-ui/hpa.yaml new file mode 100644 index 0000000..f2b9b0c --- /dev/null +++ b/him/csi-him-ui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-him-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-him-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/him/csi-him-ui/kustomization.yaml b/him/csi-him-ui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/him/csi-him-ui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/him/csi-him-ui/post.yaml b/him/csi-him-ui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/him/csi-him-ui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/him/csi-him-ui/service.yaml b/him/csi-him-ui/service.yaml new file mode 100644 index 0000000..f61f252 --- /dev/null +++ b/him/csi-him-ui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-him-ui-service + name: csi-him-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-him-ui + type: ClusterIP \ No newline at end of file diff --git a/him/csinethimservi/Deployment.yaml b/him/csinethimservi/Deployment.yaml new file mode 100644 index 0000000..2bd4534 --- /dev/null +++ b/him/csinethimservi/Deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-himservi + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-net-himservi + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-himservi + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-himservi + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-health-information-srv:4.1.184.2-hf2 + name: csi-net-himservi + ports: + - containerPort: 80 + name: http + resources: + limits: + cpu: 2000m + memory: 2Gi + requests: + cpu: 100m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/him/csinethimservi/hpa.yaml b/him/csinethimservi/hpa.yaml new file mode 100644 index 0000000..2423246 --- /dev/null +++ b/him/csinethimservi/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-himservi + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-himservi # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/him/csinethimservi/kustomization.yaml b/him/csinethimservi/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/him/csinethimservi/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/him/csinethimservi/post.yaml b/him/csinethimservi/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/him/csinethimservi/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/him/csinethimservi/service.yaml b/him/csinethimservi/service.yaml new file mode 100644 index 0000000..97ab209 --- /dev/null +++ b/him/csinethimservi/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-himservi + name: csi-net-himservi + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-himservi + type: ClusterIP diff --git a/integration/csiiedm/Deployment.yaml b/integration/csiiedm/Deployment.yaml new file mode 100644 index 0000000..28f6629 --- /dev/null +++ b/integration/csiiedm/Deployment.yaml @@ -0,0 +1,86 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ie-dm + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-ie-dm + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ie-dm + module: integration + tier: backend + track: stable + spec: + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: hostname + value: csi-ie-dm + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-integration + - secretRef: + name: service-integration-secret + image: harbor.moh.gov.sa/vidamoh/csi-ie-dm:4.0.0.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /health/liveness + port: http + initialDelaySeconds: 600 + failureThreshold: 3 + periodSeconds: 10 + name: csi-ie-dm + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /health/readiness + port: http + initialDelaySeconds: 30 + failureThreshold: 3 + periodSeconds: 10 + resources: + limits: + memory: 2Gi + requests: + cpu: 250m + memory: 512Mi + volumeMounts: + - mountPath: /app/config + name: config-vol + imagePullSecrets: + - name: regcred + volumes: + - name: config-vol + projected: + sources: + - secret: + name: service-cas-credential-secret + - configMap: + name: ie-hospital-config diff --git a/integration/csiiedm/hpa.yaml b/integration/csiiedm/hpa.yaml new file mode 100644 index 0000000..2f78ece --- /dev/null +++ b/integration/csiiedm/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ie-dm + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ie-dm # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/integration/csiiedm/kustomization.yaml b/integration/csiiedm/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/integration/csiiedm/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/integration/csiiedm/post.yaml b/integration/csiiedm/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/integration/csiiedm/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/integration/csiiedm/service.yaml b/integration/csiiedm/service.yaml new file mode 100644 index 0000000..30a887d --- /dev/null +++ b/integration/csiiedm/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-ie-dm + name: csi-ie-dm + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ie-dm + type: ClusterIP diff --git a/integration/csiiegeneral/Deployment.yaml b/integration/csiiegeneral/Deployment.yaml new file mode 100644 index 0000000..1775dbe --- /dev/null +++ b/integration/csiiegeneral/Deployment.yaml @@ -0,0 +1,85 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ie-general + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-ie-general + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ie-general + tier: backend + track: stable + spec: + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: hostname + value: csi-ie-general + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-integration + - secretRef: + name: service-integration-secret + image: harbor.moh.gov.sa/vidamoh/csi-ie-general:4.1.141.17 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /health/liveness + port: http + initialDelaySeconds: 600 + failureThreshold: 3 + periodSeconds: 10 + name: csi-ie-general + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /health/readiness + port: http + initialDelaySeconds: 30 + failureThreshold: 3 + periodSeconds: 10 + resources: + limits: + memory: 2Gi + requests: + cpu: 200m + memory: 512Mi + volumeMounts: + - mountPath: /app/config + name: config-vol + imagePullSecrets: + - name: regcred + volumes: + - name: config-vol + projected: + sources: + - secret: + name: service-cas-credential-secret + - secret: + name: service-sickleave-credential-secret \ No newline at end of file diff --git a/integration/csiiegeneral/hpa.yaml b/integration/csiiegeneral/hpa.yaml new file mode 100644 index 0000000..85679b7 --- /dev/null +++ b/integration/csiiegeneral/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ie-general + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ie-general # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 2 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + #- type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/integration/csiiegeneral/kustomization.yaml b/integration/csiiegeneral/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/integration/csiiegeneral/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/integration/csiiegeneral/post.yaml b/integration/csiiegeneral/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/integration/csiiegeneral/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/integration/csiiegeneral/service.yaml b/integration/csiiegeneral/service.yaml new file mode 100644 index 0000000..56934f7 --- /dev/null +++ b/integration/csiiegeneral/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-ie-general + name: csi-ie-general + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ie-general + type: ClusterIP \ No newline at end of file diff --git a/integration/csiiemobile/Deployment.yaml b/integration/csiiemobile/Deployment.yaml new file mode 100644 index 0000000..af295f7 --- /dev/null +++ b/integration/csiiemobile/Deployment.yaml @@ -0,0 +1,86 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ie-mobile + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-ie-mobile + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ie-mobile + tier: backend + track: stable + spec: + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: hostname + value: csi-ie-mobile + - name: JAVA_OPTS + value: "-Xms256m -Xmx2048m" + - name: JVM_OPTS + value: "-Xms256m -Xmx2048m" + envFrom: + - configMapRef: + name: service-configs + - configMapRef: + name: service-configs-integration + - secretRef: + name: service-configs-secret + - secretRef: + name: service-integration-secret + image: harbor.moh.gov.sa/vidamoh/csi-ie-mobile:V0.0.004-SNAPSHOT + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /health/liveness + port: http + initialDelaySeconds: 600 + failureThreshold: 3 + periodSeconds: 10 + name: csi-ie-mobile + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /health/readiness + port: http + initialDelaySeconds: 30 + failureThreshold: 3 + periodSeconds: 10 + resources: + limits: + cpu: 1000m + memory: 3Gi + requests: + cpu: 512m + memory: 500Mi + volumeMounts: + - mountPath: /app/config + name: config-vol + imagePullSecrets: + - name: regcred + volumes: + - name: config-vol + projected: + sources: + - secret: + name: service-cas-credential-secret + - configMap: + name: ie-hospital-config \ No newline at end of file diff --git a/integration/csiiemobile/hpa.yaml b/integration/csiiemobile/hpa.yaml new file mode 100644 index 0000000..95a1f63 --- /dev/null +++ b/integration/csiiemobile/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ie-mobile + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ie-mobile # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 2 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/integration/csiiemobile/kustomization.yaml b/integration/csiiemobile/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/integration/csiiemobile/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/integration/csiiemobile/post.yaml b/integration/csiiemobile/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/integration/csiiemobile/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/integration/csiiemobile/service.yaml b/integration/csiiemobile/service.yaml new file mode 100644 index 0000000..b61cacd --- /dev/null +++ b/integration/csiiemobile/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-ie-mobile + name: csi-ie-mobile + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ie-mobile + type: ClusterIP \ No newline at end of file diff --git a/integration/ieintegration2/Deployment.yaml b/integration/ieintegration2/Deployment.yaml new file mode 100644 index 0000000..eff58d7 --- /dev/null +++ b/integration/ieintegration2/Deployment.yaml @@ -0,0 +1,84 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ie-generalii + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-ie-generalii + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ie-generalii + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-ie-generalii + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: hostname + value: csi-ie-generalii + - name: JAVA_OPTS + value: "-Xms2048m -Xmx2048m" + - name: JVM_OPTS + value: "-Xms2048m -Xmx2048m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-integration + - secretRef: + name: service-integration-secret + image: harbor.moh.gov.sa/vidamoh/csi-ie-generalii:4.1.53.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /health/liveness + port: http + initialDelaySeconds: 600 + failureThreshold: 3 + periodSeconds: 10 + name: csi-ie-integration-2 + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /health/readiness + port: http + initialDelaySeconds: 30 + failureThreshold: 3 + periodSeconds: 10 + resources: + limits: + memory: 2.5Gi + requests: + cpu: 250m + memory: 2.5Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/integration/ieintegration2/hpa.yaml b/integration/ieintegration2/hpa.yaml new file mode 100644 index 0000000..a391faa --- /dev/null +++ b/integration/ieintegration2/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ie-generalii + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ie-generalii # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/integration/ieintegration2/kustomization.yaml b/integration/ieintegration2/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/integration/ieintegration2/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/integration/ieintegration2/post.yaml b/integration/ieintegration2/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/integration/ieintegration2/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/integration/ieintegration2/service.yaml b/integration/ieintegration2/service.yaml new file mode 100644 index 0000000..d5cad22 --- /dev/null +++ b/integration/ieintegration2/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-ie-generalii + name: csi-ie-generalii + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ie-generalii + type: ClusterIP \ No newline at end of file diff --git a/integration/vida-data-gateway/Deployment.yaml b/integration/vida-data-gateway/Deployment.yaml new file mode 100644 index 0000000..184fdf7 --- /dev/null +++ b/integration/vida-data-gateway/Deployment.yaml @@ -0,0 +1,74 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: vida-data-gateway + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: vida-data-gateway + tier: backend + track: stable + template: + metadata: + labels: + app: vida-data-gateway + tier: backend + track: stable + spec: + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: hostname + value: vida-data-gateway + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-integration + - secretRef: + name: service-integration-secret + image: harbor.moh.gov.sa/vidamoh/vida-data-gateway:4.1.141.17 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /health/liveness + port: http + initialDelaySeconds: 600 + failureThreshold: 3 + periodSeconds: 10 + name: vida-data-gateway + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /health/readiness + port: http + initialDelaySeconds: 30 + failureThreshold: 3 + periodSeconds: 10 + resources: + limits: + memory: 2Gi + requests: + cpu: 200m + memory: 512Mi + imagePullSecrets: + - name: regcred diff --git a/integration/vida-data-gateway/hpa.yaml b/integration/vida-data-gateway/hpa.yaml new file mode 100644 index 0000000..9f5129e --- /dev/null +++ b/integration/vida-data-gateway/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: vida-data-gateway + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: vida-data-gateway # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 2 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + #- type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/integration/vida-data-gateway/kustomization.yaml b/integration/vida-data-gateway/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/integration/vida-data-gateway/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/integration/vida-data-gateway/post.yaml b/integration/vida-data-gateway/post.yaml new file mode 100644 index 0000000..aa137d9 --- /dev/null +++ b/integration/vida-data-gateway/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 \ No newline at end of file diff --git a/integration/vida-data-gateway/service.yaml b/integration/vida-data-gateway/service.yaml new file mode 100644 index 0000000..440384e --- /dev/null +++ b/integration/vida-data-gateway/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: vida-data-gateway + name: vida-data-gateway + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: vida-data-gateway + type: ClusterIP \ No newline at end of file diff --git a/lab/labmgmtdotnet/Deployment.yaml b/lab/labmgmtdotnet/Deployment.yaml new file mode 100644 index 0000000..2bd26cf --- /dev/null +++ b/lab/labmgmtdotnet/Deployment.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-labsrvcs + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-net-labsrvcs + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-labsrvcs + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-labsrvcs + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/lab-labmgt-srv:4.1.332.8 + imagePullPolicy: IfNotPresent + name: csi-net-labsrvcs + readinessProbe: + httpGet: # make an HTTP request + path: /health/ready # endpoint to hit + port: 80 # port to use + initialDelaySeconds: 30 # how long to wait before checking + failureThreshold: 10 # how many failures to accept before failing + periodSeconds: 20 # how long to wait between checks + timeoutSeconds: 10 + livenessProbe: + httpGet: + path: /health/live + port: 80 + initialDelaySeconds: 60 + failureThreshold: 10 + periodSeconds: 30 + timeoutSeconds: 10 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 3Gi + # cpu: 1200m + requests: + cpu: 650m + memory: 512Mi + imagePullSecrets: + - name: regcred diff --git a/lab/labmgmtdotnet/hpa.yaml b/lab/labmgmtdotnet/hpa.yaml new file mode 100644 index 0000000..5d54328 --- /dev/null +++ b/lab/labmgmtdotnet/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-labsrvcs + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-labsrvcs # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/lab/labmgmtdotnet/kustomization.yaml b/lab/labmgmtdotnet/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/lab/labmgmtdotnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/lab/labmgmtdotnet/post.yaml b/lab/labmgmtdotnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/lab/labmgmtdotnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/lab/labmgmtdotnet/service.yaml b/lab/labmgmtdotnet/service.yaml new file mode 100644 index 0000000..72abd4b --- /dev/null +++ b/lab/labmgmtdotnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-labsrvcs + name: csi-net-labsrvcs + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-labsrvcs + type: ClusterIP \ No newline at end of file diff --git a/lab/labscheduled/Deployment.yaml b/lab/labscheduled/Deployment.yaml new file mode 100644 index 0000000..d098158 --- /dev/null +++ b/lab/labscheduled/Deployment.yaml @@ -0,0 +1,71 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-lab-scheduled + namespace: moh-prod +spec: + # replicas: 1 + selector: + matchLabels: + app: csi-net-lab-scheduled + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-lab-scheduled + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-lab-scheduled #csi-net-labsrvcs + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/lab-scheduled:4.0.19.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 10 + httpGet: + path: /health/live + port: 80 + initialDelaySeconds: 60 + periodSeconds: 30 + name: csi-net-lab-scheduled + ports: + - containerPort: 80 + name: http + readinessProbe: + failureThreshold: 10 + httpGet: + path: /health/ready + port: 80 + initialDelaySeconds: 30 + periodSeconds: 20 + resources: + limits: + memory: 2Gi + requests: + cpu: 500m + memory: 750Mi + imagePullSecrets: + - name: regcred diff --git a/lab/labscheduled/hpa.yaml b/lab/labscheduled/hpa.yaml new file mode 100644 index 0000000..9275353 --- /dev/null +++ b/lab/labscheduled/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-lab-scheduled + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-lab-scheduled # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 5 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" +# - type: memory +# metadata: +# type: Utilization +# value: "80" \ No newline at end of file diff --git a/lab/labscheduled/kustomization.yaml b/lab/labscheduled/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/lab/labscheduled/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/lab/labscheduled/post.yaml b/lab/labscheduled/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/lab/labscheduled/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/lab/labscheduled/service.yaml b/lab/labscheduled/service.yaml new file mode 100644 index 0000000..7f9f206 --- /dev/null +++ b/lab/labscheduled/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-lab-scheduled + name: csi-net-lab-scheduled + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-lab-scheduled + type: ClusterIP \ No newline at end of file diff --git a/lab/labui/Deployment.yaml b/lab/labui/Deployment.yaml new file mode 100644 index 0000000..3a9593a --- /dev/null +++ b/lab/labui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-lab-labg-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-lab-labg-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-lab-labg-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-lab-labg-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/lab-ui:4.1.134.1 + imagePullPolicy: IfNotPresent + name: csi-lab-labg-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/lab/labui/hpa.yaml b/lab/labui/hpa.yaml new file mode 100644 index 0000000..2c043bf --- /dev/null +++ b/lab/labui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-lab-labg-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-lab-labg-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/lab/labui/kustomization.yaml b/lab/labui/kustomization.yaml new file mode 100644 index 0000000..915ed1b --- /dev/null +++ b/lab/labui/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml diff --git a/lab/labui/post.yaml b/lab/labui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/lab/labui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/lab/labui/service.yaml b/lab/labui/service.yaml new file mode 100644 index 0000000..136e514 --- /dev/null +++ b/lab/labui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-lab-labg-ui-service + name: csi-lab-labg-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-lab-labg-ui + type: ClusterIP \ No newline at end of file diff --git a/lab/labvidaptor/Deployment.yaml b/lab/labvidaptor/Deployment.yaml new file mode 100644 index 0000000..26e83f1 --- /dev/null +++ b/lab/labvidaptor/Deployment.yaml @@ -0,0 +1,62 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-lab-vidaptor + namespace: moh-prod + +spec: + selector: + matchLabels: + app: csi-net-lab-vidaptor + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-lab-vidaptor + module: lab + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/lab-vidaptorintegration:4.2.3.0 + imagePullPolicy: IfNotPresent + name: csi-net-lab-vidaptor + readinessProbe: + httpGet: # make an HTTP request + path: /health/ready # endpoint to hit + port: 80 # port to use + initialDelaySeconds: 30 # how long to wait before checking + failureThreshold: 10 # how many failures to accept before failing + periodSeconds: 20 # how long to wait between checks + livenessProbe: + httpGet: + path: /health/live + port: 80 + initialDelaySeconds: 60 + failureThreshold: 10 + periodSeconds: 30 + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 150m + memory: 512Mi + imagePullSecrets: + - name: regcred diff --git a/lab/labvidaptor/hpa.yaml b/lab/labvidaptor/hpa.yaml new file mode 100644 index 0000000..6bbb6d2 --- /dev/null +++ b/lab/labvidaptor/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-lab-vidaptor + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-lab-vidaptor # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 1 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/lab/labvidaptor/kustomization.yaml b/lab/labvidaptor/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/lab/labvidaptor/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/lab/labvidaptor/post.yaml b/lab/labvidaptor/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/lab/labvidaptor/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/lab/labvidaptor/service.yaml b/lab/labvidaptor/service.yaml new file mode 100644 index 0000000..604d554 --- /dev/null +++ b/lab/labvidaptor/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-lab-vidaptor + name: csi-net-lab-vidaptor + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-lab-vidaptor + type: ClusterIP \ No newline at end of file diff --git a/notification/notyexternalservices/Deployment.yaml b/notification/notyexternalservices/Deployment.yaml new file mode 100644 index 0000000..7ae67cb --- /dev/null +++ b/notification/notyexternalservices/Deployment.yaml @@ -0,0 +1,102 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-ext + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-net-ext + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-ext + tier: backend + track: stable + spec: + #nodeName: csi-dev-wrk-01 + 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' + # envFrom: + # - configMapRef: + # name: iam-service-configs + # - secretRef: + # name: iam-service-secret + # livenessProbe: + # httpGet: + # path: /healthz/liveness + # port: 8085 + # initialDelaySeconds: 10 + # failureThreshold: 3 + # periodSeconds: 10 + # readinessProbe: + # httpGet: + # path: /healthz/readiness + # port: 8085 + # initialDelaySeconds: 10 + # failureThreshold: 3 + # periodSeconds: 10 + # resources: + # limits: + # memory: 1G + # requests: + # cpu: 50m + # memory: 256M + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-net-ext:1.0.0 + name: csi-net-ext + volumeMounts: + - name: volume-csi-net-ext + mountPath: /app/certs/ + readOnly: false + - name: volume-csi-net-tenant-mapping + mountPath: /app/mappings/ + readOnly: false + - name: volume-csi-net-appdb + mountPath: /app/data + readOnly: false + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + cpu: 250m + requests: + cpu: 250m + memory: 1Gi + imagePullSecrets: + - name: regcred + volumes: + - name: volume-csi-net-ext + secret: + secretName: secret-csi-net-ext + - name: volume-csi-net-tenant-mapping + secret: + secretName: secret-csi-net-tenant-mapping + - name: volume-csi-net-appdb + hostPath: + path: /home/noty/data + type: Directory \ No newline at end of file diff --git a/notification/notyexternalservices/hpa.yaml b/notification/notyexternalservices/hpa.yaml new file mode 100644 index 0000000..efc6f6b --- /dev/null +++ b/notification/notyexternalservices/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-ext + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-ext # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/notification/notyexternalservices/kustomization.yaml b/notification/notyexternalservices/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/notification/notyexternalservices/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/notification/notyexternalservices/post.yaml b/notification/notyexternalservices/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/notification/notyexternalservices/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/notification/notyexternalservices/service.yaml b/notification/notyexternalservices/service.yaml new file mode 100644 index 0000000..1e624f8 --- /dev/null +++ b/notification/notyexternalservices/service.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-ext + name: csi-net-ext + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + name: insecure + - port: 8085 + targetPort: 8085 + name: secure + selector: + app: csi-net-ext + type: ClusterIP diff --git a/notification/notynetbaseemail/Deployment.yaml b/notification/notynetbaseemail/Deployment.yaml new file mode 100644 index 0000000..e87a318 --- /dev/null +++ b/notification/notynetbaseemail/Deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-noty-email + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-net-noty-email + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-noty-email + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-net-base-email:4.0.2.1 + name: csi-net-noty-email + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 150m + memory: 256Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/notification/notynetbaseemail/hpa.yaml b/notification/notynetbaseemail/hpa.yaml new file mode 100644 index 0000000..1bcf620 --- /dev/null +++ b/notification/notynetbaseemail/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-noty-email + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-noty-email # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/notification/notynetbaseemail/kustomization.yaml b/notification/notynetbaseemail/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/notification/notynetbaseemail/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/notification/notynetbaseemail/post.yaml b/notification/notynetbaseemail/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/notification/notynetbaseemail/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/notification/notynetbaseemail/service.yaml b/notification/notynetbaseemail/service.yaml new file mode 100644 index 0000000..0375db0 --- /dev/null +++ b/notification/notynetbaseemail/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-noty-email + name: csi-net-noty-email + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-noty-email + type: ClusterIP \ No newline at end of file diff --git a/notification/notynetbasenotification/Deployment.yaml b/notification/notynetbasenotification/Deployment.yaml new file mode 100644 index 0000000..4f09a99 --- /dev/null +++ b/notification/notynetbasenotification/Deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-noty + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-net-noty + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-noty + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-net-base-notifications:4.0.4.2-hf3 + name: csi-net-noty + ports: + - containerPort: 80 + name: http + resources: + limits: + cpu: 600m + memory: 1Gi + requests: + cpu: 150m + memory: 256Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/notification/notynetbasenotification/hpa.yaml b/notification/notynetbasenotification/hpa.yaml new file mode 100644 index 0000000..271ede0 --- /dev/null +++ b/notification/notynetbasenotification/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-noty + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-noty # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/notification/notynetbasenotification/kustomization.yaml b/notification/notynetbasenotification/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/notification/notynetbasenotification/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/notification/notynetbasenotification/post.yaml b/notification/notynetbasenotification/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/notification/notynetbasenotification/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/notification/notynetbasenotification/service.yaml b/notification/notynetbasenotification/service.yaml new file mode 100644 index 0000000..46ddeb9 --- /dev/null +++ b/notification/notynetbasenotification/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-noty + name: csi-net-noty + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-noty + type: ClusterIP diff --git a/notification/notynetbasequery/Deployment.yaml b/notification/notynetbasequery/Deployment.yaml new file mode 100644 index 0000000..e268283 --- /dev/null +++ b/notification/notynetbasequery/Deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-noty-query + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-net-noty-query + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-noty-query + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-net-base-notifications-query:4.0.1.1-hf4 + name: csi-net-noty-query + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/notification/notynetbasequery/hpa.yaml b/notification/notynetbasequery/hpa.yaml new file mode 100644 index 0000000..10c21a4 --- /dev/null +++ b/notification/notynetbasequery/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-noty-query + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-noty-query # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/notification/notynetbasequery/kustomization.yaml b/notification/notynetbasequery/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/notification/notynetbasequery/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/notification/notynetbasequery/post.yaml b/notification/notynetbasequery/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/notification/notynetbasequery/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/notification/notynetbasequery/service.yaml b/notification/notynetbasequery/service.yaml new file mode 100644 index 0000000..fed18f3 --- /dev/null +++ b/notification/notynetbasequery/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-noty-query + name: csi-net-noty-query + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-noty-query + type: ClusterIP \ No newline at end of file diff --git a/notification/notynetbasesms/Deployment.yaml b/notification/notynetbasesms/Deployment.yaml new file mode 100644 index 0000000..e43b51c --- /dev/null +++ b/notification/notynetbasesms/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: csi-net-noty-sms + name: csi-net-noty-sms + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-net-noty-sms + template: + metadata: + labels: + app: csi-net-noty-sms + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-net-base-sms:4.0.1.1-hf2 + name: csi-net-noty-sms + ports: + - containerPort: 80 + resources: + limits: + cpu: 500m + memory: 1Gi + requests: + cpu: 150m + memory: 256Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/notification/notynetbasesms/hpa.yaml b/notification/notynetbasesms/hpa.yaml new file mode 100644 index 0000000..107e1eb --- /dev/null +++ b/notification/notynetbasesms/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-noty-sms + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-noty-sms # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/notification/notynetbasesms/kustomization.yaml b/notification/notynetbasesms/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/notification/notynetbasesms/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/notification/notynetbasesms/post.yaml b/notification/notynetbasesms/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/notification/notynetbasesms/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/notification/notynetbasesms/service.yaml b/notification/notynetbasesms/service.yaml new file mode 100644 index 0000000..46063b1 --- /dev/null +++ b/notification/notynetbasesms/service.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-noty-sms + name: csi-net-noty-sms + namespace: moh-prod +spec: + ports: + - name: http + port: 80 + targetPort: 80 + selector: + app: csi-net-noty-sms + type: ClusterIP \ No newline at end of file diff --git a/notification/notynetbasetemplate/Deployment.yaml b/notification/notynetbasetemplate/Deployment.yaml new file mode 100644 index 0000000..1bbcb4c --- /dev/null +++ b/notification/notynetbasetemplate/Deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-noty-msgtempl + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-net-noty-msgtempl + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-noty-msgtempl + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-net-base-message-templates:4.0.1.0 + name: csi-net-noty-msgtempl + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 150m + memory: 256Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/notification/notynetbasetemplate/hpa.yaml b/notification/notynetbasetemplate/hpa.yaml new file mode 100644 index 0000000..0c47fff --- /dev/null +++ b/notification/notynetbasetemplate/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-noty-msgtempl + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-noty-msgtempl # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/notification/notynetbasetemplate/kustomization.yaml b/notification/notynetbasetemplate/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/notification/notynetbasetemplate/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/notification/notynetbasetemplate/post.yaml b/notification/notynetbasetemplate/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/notification/notynetbasetemplate/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/notification/notynetbasetemplate/service.yaml b/notification/notynetbasetemplate/service.yaml new file mode 100644 index 0000000..7005b1d --- /dev/null +++ b/notification/notynetbasetemplate/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-noty-msgtempl + name: csi-net-noty-msgtempl + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-noty-msgtempl + type: ClusterIP \ No newline at end of file diff --git a/notification/notynetbasewss/Deployment.yaml b/notification/notynetbasewss/Deployment.yaml new file mode 100644 index 0000000..89d38f2 --- /dev/null +++ b/notification/notynetbasewss/Deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: csi-net-base-wss + name: csi-net-base-wss + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-net-base-wss + template: + metadata: + labels: + app: csi-net-base-wss + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: harbor.moh.gov.sa/vidamoh/csi-net-base-wss:4.0.2.1 + name: csi-net-noty-wss + ports: + - containerPort: 80 + resources: + limits: + memory: 1Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/notification/notynetbasewss/hpa.yaml b/notification/notynetbasewss/hpa.yaml new file mode 100644 index 0000000..f15296b --- /dev/null +++ b/notification/notynetbasewss/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-base-wss + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-base-wss # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/notification/notynetbasewss/kustomization.yaml b/notification/notynetbasewss/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/notification/notynetbasewss/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/notification/notynetbasewss/post.yaml b/notification/notynetbasewss/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/notification/notynetbasewss/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/notification/notynetbasewss/service.yaml b/notification/notynetbasewss/service.yaml new file mode 100644 index 0000000..867eb08 --- /dev/null +++ b/notification/notynetbasewss/service.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-base-wss + name: csi-net-base-wss + namespace: moh-prod +spec: + ports: + - name: http + port: 80 + targetPort: 80 + selector: + app: csi-net-base-wss + type: ClusterIP diff --git a/notification/notyui/Deployment.yaml b/notification/notyui/Deployment.yaml new file mode 100644 index 0000000..f0a458c --- /dev/null +++ b/notification/notyui/Deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-noty-ui + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-noty-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-noty-ui + tier: frontend + track: stable + spec: + containers: + - image: harbor.moh.gov.sa/vidamoh/noty-builder-ui:4.1.3.0 + imagePullPolicy: IfNotPresent + name: csi-noty-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/notification/notyui/hpa.yaml b/notification/notyui/hpa.yaml new file mode 100644 index 0000000..e871454 --- /dev/null +++ b/notification/notyui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-base-wss + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-base-wss # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/notification/notyui/kustomization.yaml b/notification/notyui/kustomization.yaml new file mode 100644 index 0000000..915ed1b --- /dev/null +++ b/notification/notyui/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml diff --git a/notification/notyui/post.yaml b/notification/notyui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/notification/notyui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/notification/notyui/service.yaml b/notification/notyui/service.yaml new file mode 100644 index 0000000..3342b5e --- /dev/null +++ b/notification/notyui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-noty-ui-service + name: csi-noty-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-noty-ui + type: ClusterIP \ No newline at end of file diff --git a/otp-service/Deployment.yaml b/otp-service/Deployment.yaml new file mode 100644 index 0000000..0883e11 --- /dev/null +++ b/otp-service/Deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: document-generator-core + namespace: moh-prod +spec: + replicas: 3 + selector: + matchLabels: + app: document-generator-core + tier: backend + track: stable + template: + metadata: + labels: + app: document-generator-core + module: base + tier: backend + track: stable + spec: + containers: + - image: registry.cloudsolutions.com.sa/vida-qa/document-generator-core:4.0.0.0-b1 + name: document-generator-core + ports: + - containerPort: 80 + name: http + - containerPort: 3000 + name: app + resources: + limits: + cpu: 500m + memory: 1250Mi + requests: + cpu: 150m + memory: 1000Mi + imagePullSecrets: + - name: regcred diff --git a/pharmacy/csi-phr-cron/Deployment.yaml b/pharmacy/csi-phr-cron/Deployment.yaml new file mode 100644 index 0000000..dda914b --- /dev/null +++ b/pharmacy/csi-phr-cron/Deployment.yaml @@ -0,0 +1,127 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-phr-cron + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-phr-cron + tier: backend + track: stable + template: + metadata: + labels: + app: csi-phr-cron + module: pharmacy + tier: backend + track: stable + spec: + 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: SPRING_DATA_MONGODB_URI + valueFrom: + configMapKeyRef: + key: mongodb-phr-cron-uri + name: service-config-pharmacy + - name: hostname + value: csi-phr-cron + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-phr-cron:4.0 + livenessProbe: + httpGet: + path: /api/v1.0/actuator/health + port: http + initialDelaySeconds: 1200 + failureThreshold: 3 + periodSeconds: 40 + timeoutSeconds: 30 + name: csi-phr-cron + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /api/v1.0/actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + periodSeconds: 40 + timeoutSeconds: 30 + resources: + limits: + memory: 2Gi + requests: + cpu: 400m + memory: 256Mi + imagePullSecrets: + - name: regcred diff --git a/pharmacy/csi-phr-cron/hpa.yaml b/pharmacy/csi-phr-cron/hpa.yaml new file mode 100644 index 0000000..709a3b4 --- /dev/null +++ b/pharmacy/csi-phr-cron/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-phr-cron + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-phr-cron # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/pharmacy/csi-phr-cron/kustomization.yaml b/pharmacy/csi-phr-cron/kustomization.yaml new file mode 100644 index 0000000..ebd0eb7 --- /dev/null +++ b/pharmacy/csi-phr-cron/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +#- hpa.yaml +- Deployment.yaml + diff --git a/pharmacy/csi-phr-cron/post.yaml b/pharmacy/csi-phr-cron/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/pharmacy/csi-phr-cron/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/pharmacy/csi-phr-cron/service.yaml b/pharmacy/csi-phr-cron/service.yaml new file mode 100644 index 0000000..564a36e --- /dev/null +++ b/pharmacy/csi-phr-cron/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-phr-cron + name: csi-phr-cron + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-phr-cron + type: ClusterIP diff --git a/pharmacy/ehripprescriptionjava/Deployment.yaml b/pharmacy/ehripprescriptionjava/Deployment.yaml new file mode 100644 index 0000000..7226b1c --- /dev/null +++ b/pharmacy/ehripprescriptionjava/Deployment.yaml @@ -0,0 +1,140 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-java-ehr-ip-doctor-prescription + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-java-ehr-ip-doctor-prescription + tier: backend + track: stable + template: + metadata: + labels: + app: csi-java-ehr-ip-doctor-prescription + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-java-ehr-ip-doctor-prescription + 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: prescription-db-url + name: service-config-pharmacy + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: prescription-db-username + name: service-pharmacy-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: prescription-db-password + name: service-pharmacy-secret + - name: SPRING_DATASOURCE_JPA_DATABASE_PLATFORM + valueFrom: + configMapKeyRef: + key: prescription-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: SPRING_RABBITMQ_HOST + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_HOST + name: service-configs + - name: SPRING_RABBITMQ_PORT + valueFrom: + configMapKeyRef: + key: SPRING_RABBITMQ_PORT + name: service-configs + - name: SPRING_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_USERNAME + name: service-configs-secret + - name: SPRING_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + key: SPRING_RABBITMQ_PASSWORD + name: service-configs-secret + - name: hostname + value: csi-java-ehr-ip-doctor-prescription + - name: JAVA_OPTS + value: "-Xms3072m -Xmx3072m" + - name: JVM_OPTS + value: "-Xms3072m -Xmx3072m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-java-ehr-ip-doctor-prescription:4.0.28.1-hf1 + livenessProbe: + httpGet: + path: /api/health/liveness + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-java-ehr-ip-doctor-prescription + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /api/health/readiness + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + resources: + limits: + cpu: 2000m + memory: 3Gi + requests: + cpu: 250m + memory: 2Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/pharmacy/ehripprescriptionjava/hpa.yaml b/pharmacy/ehripprescriptionjava/hpa.yaml new file mode 100644 index 0000000..d519d1a --- /dev/null +++ b/pharmacy/ehripprescriptionjava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-java-ehr-ip-doctor-prescription + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-java-ehr-ip-doctor-prescription # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + #- type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/pharmacy/ehripprescriptionjava/kustomization.yaml b/pharmacy/ehripprescriptionjava/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/pharmacy/ehripprescriptionjava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/pharmacy/ehripprescriptionjava/post.yaml b/pharmacy/ehripprescriptionjava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/pharmacy/ehripprescriptionjava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/pharmacy/ehripprescriptionjava/service.yaml b/pharmacy/ehripprescriptionjava/service.yaml new file mode 100644 index 0000000..38e266d --- /dev/null +++ b/pharmacy/ehripprescriptionjava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ehr-ip-doctor-prescription + name: csi-java-ehr-ip-doctor-prescription + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-java-ehr-ip-doctor-prescription + type: ClusterIP \ No newline at end of file diff --git a/pharmacy/medispan/Deployment.yaml b/pharmacy/medispan/Deployment.yaml new file mode 100644 index 0000000..6c3115a --- /dev/null +++ b/pharmacy/medispan/Deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-medispan + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-net-medispan + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-medispan + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-net-medispan + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT + value: 'false' + image: harbor.moh.gov.sa/vidamoh/csi-net-base-integrations-medispan:4.0.1.0-hf3 + name: csi-net-medispan + ports: + - containerPort: 80 + name: http + resources: + limits: + cpu: 1000m + memory: 3Gi + requests: + cpu: 250m + memory: 750Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/pharmacy/medispan/hpa.yaml b/pharmacy/medispan/hpa.yaml new file mode 100644 index 0000000..8c5a99a --- /dev/null +++ b/pharmacy/medispan/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-medispan + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-medispan # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/pharmacy/medispan/kustomization.yaml b/pharmacy/medispan/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/pharmacy/medispan/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/pharmacy/medispan/post.yaml b/pharmacy/medispan/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/pharmacy/medispan/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/pharmacy/medispan/service.yaml b/pharmacy/medispan/service.yaml new file mode 100644 index 0000000..5573ee0 --- /dev/null +++ b/pharmacy/medispan/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-medispan + name: csi-net-medispan + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-medispan + type: ClusterIP diff --git a/pharmacy/pharmacyui/Deployment.yaml b/pharmacy/pharmacyui/Deployment.yaml new file mode 100644 index 0000000..f432e37 --- /dev/null +++ b/pharmacy/pharmacyui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-pharmacy-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-pharmacy-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-pharmacy-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-pharmacy-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/pharmacy-ui:4.0.40.2-hf2 + imagePullPolicy: IfNotPresent + name: csi-pharmacy-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/pharmacy/pharmacyui/hpa.yaml b/pharmacy/pharmacyui/hpa.yaml new file mode 100644 index 0000000..adb8890 --- /dev/null +++ b/pharmacy/pharmacyui/hpa.yaml @@ -0,0 +1,45 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-pharmacy-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: csi-pharmacy-ui + pollingInterval: 30 + cooldownPeriod: 300 + minReplicaCount: 3 + maxReplicaCount: 4 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + + + + apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-pharmacy-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-pharmacy-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/pharmacy/pharmacyui/kustomization.yaml b/pharmacy/pharmacyui/kustomization.yaml new file mode 100644 index 0000000..6b890e1 --- /dev/null +++ b/pharmacy/pharmacyui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml \ No newline at end of file diff --git a/pharmacy/pharmacyui/post.yaml b/pharmacy/pharmacyui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/pharmacy/pharmacyui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/pharmacy/pharmacyui/service.yaml b/pharmacy/pharmacyui/service.yaml new file mode 100644 index 0000000..aa21198 --- /dev/null +++ b/pharmacy/pharmacyui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-pharmacy-ui-service + name: csi-pharmacy-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-pharmacy-ui + type: ClusterIP \ No newline at end of file diff --git a/pharmacy/phrbasejava/Deployment.yaml b/pharmacy/phrbasejava/Deployment.yaml new file mode 100644 index 0000000..2d1a696 --- /dev/null +++ b/pharmacy/phrbasejava/Deployment.yaml @@ -0,0 +1,139 @@ +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 \ No newline at end of file diff --git a/pharmacy/phrbasejava/hpa.yaml b/pharmacy/phrbasejava/hpa.yaml new file mode 100644 index 0000000..e261685 --- /dev/null +++ b/pharmacy/phrbasejava/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-phr-base + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-phr-base # Mandatory. Must be in the same namespace as the ScaledObject + pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "100" diff --git a/pharmacy/phrbasejava/kustomization.yaml b/pharmacy/phrbasejava/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/pharmacy/phrbasejava/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/pharmacy/phrbasejava/post.yaml b/pharmacy/phrbasejava/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/pharmacy/phrbasejava/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/pharmacy/phrbasejava/service.yaml b/pharmacy/phrbasejava/service.yaml new file mode 100644 index 0000000..49bf436 --- /dev/null +++ b/pharmacy/phrbasejava/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-phr-base + name: csi-phr-base + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-phr-base + type: ClusterIP \ No newline at end of file diff --git a/post.yaml b/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/renal/renalnet/Deployment.yaml b/renal/renalnet/Deployment.yaml new file mode 100644 index 0000000..6fbd88e --- /dev/null +++ b/renal/renalnet/Deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-net-hemdialy + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-net-hemdialy + tier: backend + track: stable + template: + metadata: + labels: + app: csi-net-hemdialy + tier: backend + track: stable + spec: + containers: + - env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: ASPNETCORE_ENVIRONMENT + valueFrom: + configMapKeyRef: + key: net_environment + name: service-configs + - name: config_server + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + image: 'harbor.moh.gov.sa/vidamoh/ren-hemodialysis-srv:V4.1.0.153' + name: csi-net-hemdialy + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 150m + memory: 750Mi + imagePullSecrets: + - name: regcred diff --git a/renal/renalnet/hpa.yaml b/renal/renalnet/hpa.yaml new file mode 100644 index 0000000..18677e2 --- /dev/null +++ b/renal/renalnet/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-net-hemdialy + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-net-hemdialy # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/renal/renalnet/kustomization.yaml b/renal/renalnet/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/renal/renalnet/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/renal/renalnet/post.yaml b/renal/renalnet/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/renal/renalnet/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/renal/renalnet/service.yaml b/renal/renalnet/service.yaml new file mode 100644 index 0000000..488f3ef --- /dev/null +++ b/renal/renalnet/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-net-hemdialy + name: csi-net-hemdialy + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-net-hemdialy + type: ClusterIP \ No newline at end of file diff --git a/reporting/csi-rf-jdbc-sink/Deployment.yaml b/reporting/csi-rf-jdbc-sink/Deployment.yaml new file mode 100644 index 0000000..3a86143 --- /dev/null +++ b/reporting/csi-rf-jdbc-sink/Deployment.yaml @@ -0,0 +1,63 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-rf-jdbc-sink + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-rf-jdbc-sink + tier: backend + track: stable + template: + metadata: + labels: + app: csi-rf-jdbc-sink + module: rf + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-rf-jdbc-sink + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: METADATA_TOPIC + valueFrom: + configMapKeyRef: + key: METADATA_TOPIC + name: service-configs-jdbc-sink + - name: DATA_TOPIC + valueFrom: + configMapKeyRef: + key: DATA_TOPIC + name: service-configs-jdbc-sink + envFrom: + - configMapRef: + name: service-configs-jdbc-sink + - secretRef: + name: service-jdbc-sink-secret + image: harbor.moh.gov.sa/vidamoh/csi-rf-jdbc-sink:4.1.1.5 + imagePullPolicy: IfNotPresent + name: csi-rf-jdbc-sink + ports: + - containerPort: 80 + name: http + protocol: TCP + resources: + limits: + cpu: 1000m + memory: 2Gi + requests: + cpu: 150m + memory: 1Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/reporting/csi-rf-jdbc-sink/hpa.yaml b/reporting/csi-rf-jdbc-sink/hpa.yaml new file mode 100644 index 0000000..e338fde --- /dev/null +++ b/reporting/csi-rf-jdbc-sink/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-rf-jdbc-sink + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-rf-jdbc-sink # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/reporting/csi-rf-jdbc-sink/kustomization.yaml b/reporting/csi-rf-jdbc-sink/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/reporting/csi-rf-jdbc-sink/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/reporting/csi-rf-jdbc-sink/post.yaml b/reporting/csi-rf-jdbc-sink/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/reporting/csi-rf-jdbc-sink/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/reporting/csi-rf-jdbc-sink/service.yaml b/reporting/csi-rf-jdbc-sink/service.yaml new file mode 100644 index 0000000..dddf050 --- /dev/null +++ b/reporting/csi-rf-jdbc-sink/service.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-rf-jdbc-sink + name: csi-rf-jdbc-sink-service + namespace: moh-prod +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: csi-rf-jdbc-sink + type: ClusterIP \ No newline at end of file diff --git a/reporting/csistreamingetl/Deployment.yaml b/reporting/csistreamingetl/Deployment.yaml new file mode 100644 index 0000000..798e8db --- /dev/null +++ b/reporting/csistreamingetl/Deployment.yaml @@ -0,0 +1,62 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-streaming-etl + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-streaming-etl + tier: backend + track: stable + template: + metadata: + labels: + app: csi-streaming-etl + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-streaming-etl + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: kafka_bootstrap_servers + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_BOOTSTRAPADDRESS + name: service-configs + - name: elk_log_topic + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_TOPIC + name: service-configs + envFrom: + - configMapRef: + name: service-configs-stream-etl + - secretRef: + name: service-stream-etl-secret + image: 'harbor.moh.gov.sa/vidamoh/csi-streaming-etl:4.1.1.20' + imagePullPolicy: IfNotPresent + name: csi-streaming-etl + ports: + - containerPort: 80 + name: http + protocol: TCP + resources: + limits: + cpu: 500m + memory: 4Gi + requests: + cpu: 250m + memory: 500Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/reporting/csistreamingetl/hpa.yaml b/reporting/csistreamingetl/hpa.yaml new file mode 100644 index 0000000..4a902cf --- /dev/null +++ b/reporting/csistreamingetl/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-streaming-etl + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-streaming-etl # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/reporting/csistreamingetl/kustomization.yaml b/reporting/csistreamingetl/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/reporting/csistreamingetl/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/reporting/csistreamingetl/post.yaml b/reporting/csistreamingetl/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/reporting/csistreamingetl/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/reporting/csistreamingetl/service.yaml b/reporting/csistreamingetl/service.yaml new file mode 100644 index 0000000..8dbb932 --- /dev/null +++ b/reporting/csistreamingetl/service.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: csi-streaming-etl-service + namespace: moh-prod +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: csi-streaming-etl + type: ClusterIP \ No newline at end of file diff --git a/reporting/reportingengv2/Deployment.yaml b/reporting/reportingengv2/Deployment.yaml new file mode 100644 index 0000000..1805128 --- /dev/null +++ b/reporting/reportingengv2/Deployment.yaml @@ -0,0 +1,117 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-reporting + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-reporting + tier: backend + track: stable + template: + metadata: + labels: + app: csi-reporting + 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 + failureThreshold: 3 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz/readiness + port: 8085 + initialDelaySeconds: 10 + failureThreshold: 3 + periodSeconds: 10 + resources: + limits: + memory: 1G + requests: + cpu: 50m + memory: 256M + - env: + - name: kafka_bootstrap_servers + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_BOOTSTRAPADDRESS + name: service-configs + - name: elk_log_topic + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_TOPIC + name: service-configs + - name: SECURITY_IAM_URL + value: 'https://csi-iam-service/' + - name: hostname + value: csi-reporting-service + envFrom: + - configMapRef: + name: service-configs-reporting + - secretRef: + name: service-reporting-secret + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-rf-reportingservice:4.1.11.14 + imagePullPolicy: IfNotPresent + name: csi-reporting + ports: + - containerPort: 80 + name: http + protocol: TCP + resources: + limits: + memory: 6500Mi + requests: + cpu: 250m + memory: 6500Mi + volumeMounts: + - mountPath: /app/dbschema_config + name: dbschema-config-vol + imagePullSecrets: + - name: regcred + volumes: + - name: dbschema-config-vol + projected: + sources: + - configMap: + name: service-configs-dbschemas-reporting \ No newline at end of file diff --git a/reporting/reportingengv2/hpa.yaml b/reporting/reportingengv2/hpa.yaml new file mode 100644 index 0000000..6e81785 --- /dev/null +++ b/reporting/reportingengv2/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-reporting + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-reporting # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/reporting/reportingengv2/kustomization.yaml b/reporting/reportingengv2/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/reporting/reportingengv2/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/reporting/reportingengv2/post.yaml b/reporting/reportingengv2/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/reporting/reportingengv2/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/reporting/reportingengv2/service.yaml b/reporting/reportingengv2/service.yaml new file mode 100644 index 0000000..0a15b04 --- /dev/null +++ b/reporting/reportingengv2/service.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: csi-reporting-service + namespace: moh-prod +spec: + ports: + - port: 80 + name: insecure + protocol: TCP + targetPort: 80 + - port: 8085 + name: secure + protocol: TCP + targetPort: 8085 + selector: + app: csi-reporting + type: ClusterIP \ No newline at end of file diff --git a/reporting/reportingupload/Deployment.yaml b/reporting/reportingupload/Deployment.yaml new file mode 100644 index 0000000..98a0652 --- /dev/null +++ b/reporting/reportingupload/Deployment.yaml @@ -0,0 +1,107 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-rf-file-uploader + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-rf-file-uploader + tier: backend + track: stable + template: + metadata: + labels: + app: csi-rf-file-uploader + module: reporting + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-rf-file-uploader + topologyKey: "kubernetes.io/hostname" + 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 + failureThreshold: 3 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz/readiness + port: 8085 + initialDelaySeconds: 10 + failureThreshold: 3 + periodSeconds: 10 + resources: + limits: + memory: 1G + requests: + cpu: 50m + memory: 256M + - env: + - name: SECURITY_IAM_URL + value: 'https://csi-iam-service/' + - name: hostname + value: csi-reporting-service + - name: JAVA_OPTS + value: -Xms3g -Xmx3g + envFrom: + - configMapRef: + name: service-configs-rf-uploader + - secretRef: + name: service-secret-rf-uploader + image: harbor.moh.gov.sa/vidamoh/csi-rf-file-uploader:4.0.1.9 + imagePullPolicy: IfNotPresent + name: csi-rf-file-uploader + ports: + - containerPort: 8080 + name: http + protocol: TCP + resources: + limits: + memory: 4Gi + requests: + cpu: 100m + memory: 3Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/reporting/reportingupload/hpa.yaml b/reporting/reportingupload/hpa.yaml new file mode 100644 index 0000000..a0b25e7 --- /dev/null +++ b/reporting/reportingupload/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-rf-file-uploader + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-rf-file-uploader # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/reporting/reportingupload/kustomization.yaml b/reporting/reportingupload/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/reporting/reportingupload/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/reporting/reportingupload/post.yaml b/reporting/reportingupload/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/reporting/reportingupload/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/reporting/reportingupload/service.yaml b/reporting/reportingupload/service.yaml new file mode 100644 index 0000000..5e85258 --- /dev/null +++ b/reporting/reportingupload/service.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: csi-rf-file-uploader-service + namespace: moh-prod +spec: + ports: + - port: 80 + name: insecure + protocol: TCP + targetPort: 80 + - port: 8085 + name: secure + protocol: TCP + targetPort: 8085 + selector: + app: csi-rf-file-uploader + type: ClusterIP \ No newline at end of file diff --git a/reporting/reportstudio/Deployment.yaml b/reporting/reportstudio/Deployment.yaml new file mode 100644 index 0000000..bff8a1e --- /dev/null +++ b/reporting/reportstudio/Deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-report-studio-ui + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-report-studio-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-report-studio-ui + tier: frontend + track: stable + spec: + containers: + - image: harbor.moh.gov.sa/vidamoh/report-studio-ui:4.1.28.18 + imagePullPolicy: IfNotPresent + name: csi-report-studio-ui + ports: + - containerPort: 80 + name: http + protocol: TCP + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/reporting/reportstudio/hpa.yaml b/reporting/reportstudio/hpa.yaml new file mode 100644 index 0000000..b0876c8 --- /dev/null +++ b/reporting/reportstudio/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-report-studio-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-report-studio-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/reporting/reportstudio/kustomization.yaml b/reporting/reportstudio/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/reporting/reportstudio/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/reporting/reportstudio/post.yaml b/reporting/reportstudio/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/reporting/reportstudio/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/reporting/reportstudio/service.yaml b/reporting/reportstudio/service.yaml new file mode 100644 index 0000000..9ae0bcb --- /dev/null +++ b/reporting/reportstudio/service.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: csi-report-studio-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: csi-report-studio-ui + type: ClusterIP \ No newline at end of file diff --git a/rms/adtui/Deployment.yaml b/rms/adtui/Deployment.yaml new file mode 100644 index 0000000..fbc0c08 --- /dev/null +++ b/rms/adtui/Deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-adt-ui + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-adt-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-adt-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-adt-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/adt-ui:4.3.87.3 + imagePullPolicy: IfNotPresent + name: csi-adt-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred + diff --git a/rms/adtui/hpa.yaml b/rms/adtui/hpa.yaml new file mode 100644 index 0000000..5873f7a --- /dev/null +++ b/rms/adtui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-adt-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-adt-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/rms/adtui/kustomization.yaml b/rms/adtui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/rms/adtui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/rms/adtui/post.yaml b/rms/adtui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/adtui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/adtui/service.yaml b/rms/adtui/service.yaml new file mode 100644 index 0000000..6ebbc49 --- /dev/null +++ b/rms/adtui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-adt-ui-service + name: csi-adt-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-adt-ui + type: ClusterIP \ No newline at end of file diff --git a/rms/dsdental/Deployment.yaml b/rms/dsdental/Deployment.yaml new file mode 100644 index 0000000..4cb002a --- /dev/null +++ b/rms/dsdental/Deployment.yaml @@ -0,0 +1,85 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-java-ds-dental-core + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-java-ds-dental-core + tier: backend + track: stable + template: + metadata: + labels: + app: csi-java-ds-dental-core + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-java-ds-dental-core + 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-configs-adt + - name: hostname + value: csi-java-ds-dental-core + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-adt + - secretRef: + name: service-adt-secret + image: harbor.moh.gov.sa/vidamoh/csi-ds-dental-core-java-sev:4.1.0.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /dental/actuator/health + port: http + initialDelaySeconds: 1200 + failureThreshold: 3 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /dental/actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-java-ds-dental-core + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 2Gi + requests: + cpu: 200m + memory: 512Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/rms/dsdental/hpa.yaml b/rms/dsdental/hpa.yaml new file mode 100644 index 0000000..12f87ed --- /dev/null +++ b/rms/dsdental/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-java-ds-dental-core + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-java-ds-dental-core # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/rms/dsdental/kustomization.yaml b/rms/dsdental/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/rms/dsdental/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/rms/dsdental/post.yaml b/rms/dsdental/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/dsdental/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/dsdental/service.yaml b/rms/dsdental/service.yaml new file mode 100644 index 0000000..a18a89b --- /dev/null +++ b/rms/dsdental/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-java-ds-dental-core + name: csi-java-ds-dental-core + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-java-ds-dental-core + type: ClusterIP diff --git a/rms/mlmui/Deployment.yaml b/rms/mlmui/Deployment.yaml new file mode 100644 index 0000000..cf9c249 --- /dev/null +++ b/rms/mlmui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-mlm-ui + namespace: moh-prod +spec: + #replicas: 2 + selector: + matchLabels: + app: csi-mlm-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-mlm-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-mlm-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/mlm-ui:4.4.106.0 + imagePullPolicy: IfNotPresent + name: csi-mlm-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/rms/mlmui/hpa.yaml b/rms/mlmui/hpa.yaml new file mode 100644 index 0000000..81056e8 --- /dev/null +++ b/rms/mlmui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-mlm-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-mlm-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/rms/mlmui/kustomization.yaml b/rms/mlmui/kustomization.yaml new file mode 100644 index 0000000..6b890e1 --- /dev/null +++ b/rms/mlmui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml \ No newline at end of file diff --git a/rms/mlmui/post.yaml b/rms/mlmui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/mlmui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/mlmui/service.yaml b/rms/mlmui/service.yaml new file mode 100644 index 0000000..abdadc1 --- /dev/null +++ b/rms/mlmui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-mlm-ui-service + name: csi-mlm-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-mlm-ui + type: ClusterIP \ No newline at end of file diff --git a/rms/pmsadtrequest/Deployment.yaml b/rms/pmsadtrequest/Deployment.yaml new file mode 100644 index 0000000..b4d24f7 --- /dev/null +++ b/rms/pmsadtrequest/Deployment.yaml @@ -0,0 +1,93 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-pms-adt-request + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-pms-adt-request + tier: backend + track: stable + template: + metadata: + labels: + app: csi-pms-adt-request + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-pms-adt-request + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: namespace + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: active_profile + name: service-configs-adt + - name: hostname + value: csi-pms-adt-request + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: SPRING_JPA_PROPERTIES_HIBERNATE_TEMP_USE_JDBC_METADATA_DEFAULTS + value: 'true' + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-adt + - secretRef: + name: service-adt-secret + image: harbor.moh.gov.sa/vidamoh/csi-pms-adt-request-java-sev:4.1.36.2-hf2 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-pms-adt-request + ports: + - containerPort: 80 + name: http + + resources: + limits: + memory: 2.5Gi + requests: + cpu: 150m + memory: 512Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/rms/pmsadtrequest/hpa.yaml b/rms/pmsadtrequest/hpa.yaml new file mode 100644 index 0000000..3948551 --- /dev/null +++ b/rms/pmsadtrequest/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-pms-adt-request + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-pms-adt-request # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + #- type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/rms/pmsadtrequest/kustomization.yaml b/rms/pmsadtrequest/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/rms/pmsadtrequest/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/rms/pmsadtrequest/post.yaml b/rms/pmsadtrequest/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/pmsadtrequest/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/pmsadtrequest/service.yaml b/rms/pmsadtrequest/service.yaml new file mode 100644 index 0000000..99bc8ec --- /dev/null +++ b/rms/pmsadtrequest/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-pms-adt-request + name: csi-pms-adt-request + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-pms-adt-request + type: ClusterIP diff --git a/rms/rmsmasterdata/Deployment.yaml b/rms/rmsmasterdata/Deployment.yaml new file mode 100644 index 0000000..9725264 --- /dev/null +++ b/rms/rmsmasterdata/Deployment.yaml @@ -0,0 +1,102 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-rms-masterdata + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-rms-masterdata + tier: backend + track: stable + template: + metadata: + labels: + app: csi-rms-masterdata + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-rms-masterdata + 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-configs-adt + - name: CACHE_TYPE + valueFrom: + configMapKeyRef: + key: cache_type + name: service-configs + - name: hostname + value: csi-pms-rms-masterdata + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: SPRING_DATASOURCE_TOMCAT_MIN-EVICTABLE-IDLE-TIME-MILLIS + value: '60000' + - name: SPRING_DATASOURCE_TOMCAT_MAX-ACTIVE + value: '225' + - name: SPRING_DATASOURCE_TOMCAT_MAX-IDLE + value: '40' + - name: SPRING_DATASOURCE_TOMCAT_MIN-IDLE + value: '5' + - name: SPRING_JPA_PROPERTIES_HIBERNATE_TEMP_USE_JDBC_METADATA_DEFAULTS + value: 'true' + - name: JAVA_OPTS + value: "-Xms1024m -Xmx3072m" + - name: JVM_OPTS + value: "-Xms1024m -Xmx3072m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-adt + - secretRef: + name: service-adt-secret + image: harbor.moh.gov.sa/vidamoh/csi-rms-masterdata-java-sev:4.1.41.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /amd-masterdata/actuator/health + port: http + initialDelaySeconds: 1200 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + readinessProbe: + httpGet: + path: /amd-masterdata/actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-rms-masterdata + ports: + - containerPort: 80 + name: http + + resources: + limits: + memory: 4Gi + requests: + cpu: 250m + memory: 1.5Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/rms/rmsmasterdata/hpa.yaml b/rms/rmsmasterdata/hpa.yaml new file mode 100644 index 0000000..48ecbb6 --- /dev/null +++ b/rms/rmsmasterdata/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-rms-masterdata + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-rms-masterdata # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/rms/rmsmasterdata/kustomization.yaml b/rms/rmsmasterdata/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/rms/rmsmasterdata/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/rms/rmsmasterdata/post.yaml b/rms/rmsmasterdata/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/rmsmasterdata/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/rmsmasterdata/service.yaml b/rms/rmsmasterdata/service.yaml new file mode 100644 index 0000000..f398c77 --- /dev/null +++ b/rms/rmsmasterdata/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-pms-rms-masterdata + name: csi-pms-rms-masterdata + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-rms-masterdata + type: ClusterIP diff --git a/rms/rmsmorgue/Deployment.yaml b/rms/rmsmorgue/Deployment.yaml new file mode 100644 index 0000000..71375a1 --- /dev/null +++ b/rms/rmsmorgue/Deployment.yaml @@ -0,0 +1,98 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-rms-morgue + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-rms-morgue + tier: backend + track: stable + template: + metadata: + labels: + app: csi-rms-morgue + module: rms + tier: backend + track: stable + spec: + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: CACHE_TYPE + valueFrom: + configMapKeyRef: + key: cache_type + name: service-configs + - name: hostname + value: csi-rms-morgue + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: SPRING_DATASOURCE_TOMCAT_MIN-EVICTABLE-IDLE-TIME-MILLIS + value: '60000' + - name: SPRING_DATASOURCE_TOMCAT_MAX-ACTIVE + value: '225' + - name: SPRING_DATASOURCE_TOMCAT_MAX-IDLE + value: '40' + - name: SPRING_DATASOURCE_TOMCAT_MIN-IDLE + value: '5' + - name: TIMING_DEDICATED-RESOURCE_RELEASE_INTERVAL + value: '60000' + - name: TIMING_DEDICATED-RESOURCE_RELEASE_BED_OFFSET-MINS + value: '1' + - name: SPRING_JPA_PROPERTIES_HIBERNATE_TEMP_USE_JDBC_METADATA_DEFAULTS + value: 'true' + - name: JAVA_OPTS + value: "-Xms256m -Xmx1024m" + - name: JVM_OPTS + value: "-Xms256m -Xmx1024m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-adt + - secretRef: + name: service-adt-secret + image: harbor.moh.gov.sa/vidamoh/csi-rms-morgue-java-service:4.1.64.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 1200 + failureThreshold: 3 + periodSeconds: 40 + timeoutSeconds: 30 + name: csi-rms-morgue + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + periodSeconds: 40 + timeoutSeconds: 30 + resources: + limits: + memory: 1Gi + requests: + cpu: 150m + memory: 600Mi + imagePullSecrets: + - name: regcred diff --git a/rms/rmsmorgue/hpa.yaml b/rms/rmsmorgue/hpa.yaml new file mode 100644 index 0000000..47485e3 --- /dev/null +++ b/rms/rmsmorgue/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-rms-morgue + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-rms-morgue # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/rms/rmsmorgue/kustomization.yaml b/rms/rmsmorgue/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/rms/rmsmorgue/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/rms/rmsmorgue/post.yaml b/rms/rmsmorgue/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/rmsmorgue/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/rmsmorgue/service.yaml b/rms/rmsmorgue/service.yaml new file mode 100644 index 0000000..15a331d --- /dev/null +++ b/rms/rmsmorgue/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-rms-morgue + name: csi-rms-morgue + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-rms-morgue + type: ClusterIP diff --git a/rms/rmsmorgueui/Deployment.yaml b/rms/rmsmorgueui/Deployment.yaml new file mode 100644 index 0000000..1594373 --- /dev/null +++ b/rms/rmsmorgueui/Deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-morgue-ui + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-morgue-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-morgue-ui + module: rms + tier: frontend + track: stable + spec: + containers: + - image: harbor.moh.gov.sa/vidamoh/morgue-ui:4.2.144.0 + imagePullPolicy: IfNotPresent + name: csi-morgue-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred diff --git a/rms/rmsmorgueui/kustomization.yaml b/rms/rmsmorgueui/kustomization.yaml new file mode 100644 index 0000000..915ed1b --- /dev/null +++ b/rms/rmsmorgueui/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml diff --git a/rms/rmsmorgueui/post.yaml b/rms/rmsmorgueui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/rmsmorgueui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/rmsmorgueui/service.yaml b/rms/rmsmorgueui/service.yaml new file mode 100644 index 0000000..3414342 --- /dev/null +++ b/rms/rmsmorgueui/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-morgue-ui-service + name: csi-morgue-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-morgue-ui + type: ClusterIP diff --git a/rms/rmsreservation/Deployment.yaml b/rms/rmsreservation/Deployment.yaml new file mode 100644 index 0000000..a55275d --- /dev/null +++ b/rms/rmsreservation/Deployment.yaml @@ -0,0 +1,106 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-rms-reservation + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-rms-reservation + tier: backend + track: stable + template: + metadata: + labels: + app: csi-rms-reservation + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-rms-reservation + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: CACHE_TYPE + valueFrom: + configMapKeyRef: + key: cache_type + name: service-configs + - name: hostname + value: csi-pms-rms-reservation + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: SPRING_DATASOURCE_TOMCAT_MIN-EVICTABLE-IDLE-TIME-MILLIS + value: '60000' + - name: SPRING_DATASOURCE_TOMCAT_MAX-ACTIVE + value: '225' + - name: SPRING_DATASOURCE_TOMCAT_MAX-IDLE + value: '40' + - name: SPRING_DATASOURCE_TOMCAT_MIN-IDLE + value: '5' + - name: TIMING_DEDICATED-RESOURCE_RELEASE_INTERVAL + value: '60000' + - name: TIMING_DEDICATED-RESOURCE_RELEASE_BED_OFFSET-MINS + value: '1' + - name: SPRING_JPA_PROPERTIES_HIBERNATE_TEMP_USE_JDBC_METADATA_DEFAULTS + value: 'true' + - name: JAVA_OPTS + value: "-Xms512m -Xmx2048m" + - name: JVM_OPTS + value: "-Xms512m -Xmx2048m" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-adt + - secretRef: + name: service-adt-secret + image: harbor.moh.gov.sa/vidamoh/csi-rms-reservation-java-sev:4.1.45.3 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 30 + periodSeconds: 40 + name: csi-rms-reservation + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + resources: + limits: + cpu: 1500m + memory: 3Gi + requests: + cpu: 200m + memory: 1Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/rms/rmsreservation/hpa.yaml b/rms/rmsreservation/hpa.yaml new file mode 100644 index 0000000..61a9f8c --- /dev/null +++ b/rms/rmsreservation/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-rms-reservation + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-rms-reservation # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" +# - type: memory +# metadata: +# type: Utilization +# value: "90" \ No newline at end of file diff --git a/rms/rmsreservation/kustomization.yaml b/rms/rmsreservation/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/rms/rmsreservation/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/rms/rmsreservation/post.yaml b/rms/rmsreservation/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/rmsreservation/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/rmsreservation/service.yaml b/rms/rmsreservation/service.yaml new file mode 100644 index 0000000..53a1707 --- /dev/null +++ b/rms/rmsreservation/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-pms-rms-reservation + name: csi-pms-rms-reservation + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-rms-reservation + type: ClusterIP \ No newline at end of file diff --git a/rms/rmsresourceregistry/Deployment.yaml b/rms/rmsresourceregistry/Deployment.yaml new file mode 100644 index 0000000..cc6ba26 --- /dev/null +++ b/rms/rmsresourceregistry/Deployment.yaml @@ -0,0 +1,109 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-rms-resource-registry + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-rms-resource-registry + tier: backend + track: stable + template: + metadata: + labels: + app: csi-rms-resource-registry + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-rms-resource-registry + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: CACHE_TYPE + valueFrom: + configMapKeyRef: + key: cache_type + name: service-configs + - name: hostname + value: csi-pms-rms-resource-registry + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: SPRING_DATASOURCE_TOMCAT_MIN-EVICTABLE-IDLE-TIME-MILLIS + value: '60000' + - name: SPRING_DATASOURCE_TOMCAT_MAX-ACTIVE + value: '225' + - name: SPRING_DATASOURCE_TOMCAT_MAX-IDLE + value: '40' + - name: SPRING_DATASOURCE_TOMCAT_MIN-IDLE + value: '5' + - name: SPRING_JPA_PROPERTIES_HIBERNATE_TEMP_USE_JDBC_METADATA_DEFAULTS + value: 'true' + - name: JAVA_OPTS + value: "-Xms512m -Xmx3072m" + - name: JVM_OPTS + value: "-XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=70 -XX:CompressedClassSpaceSize=64m -XX:ReservedCodeCacheSize=64m -XX:MaxMetaspaceSize=256m -Xms512m -Xmx3072m -XX:MaxRAMPercentage=70" + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + - configMapRef: + name: service-configs-adt + - secretRef: + name: service-adt-secret + image: harbor.moh.gov.sa/vidamoh/csi-rms-resource-registry-java-sev:4.1.20.0-hf1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 600 + failureThreshold: 3 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-rms-resource-registry + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 4Gi + requests: + cpu: 200m + memory: 1Gi + volumeMounts: + - name: heapdumps-volume + mountPath: /app/heapdumps + imagePullSecrets: + - name: regcred + volumes: + - name: heapdumps-volume + hostPath: + path: /heapdumps + type: DirectoryOrCreate \ No newline at end of file diff --git a/rms/rmsresourceregistry/hpa.yaml b/rms/rmsresourceregistry/hpa.yaml new file mode 100644 index 0000000..24852f4 --- /dev/null +++ b/rms/rmsresourceregistry/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-rms-resource-registry + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-rms-resource-registry # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/rms/rmsresourceregistry/kustomization.yaml b/rms/rmsresourceregistry/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/rms/rmsresourceregistry/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/rms/rmsresourceregistry/post.yaml b/rms/rmsresourceregistry/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/rmsresourceregistry/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/rmsresourceregistry/service.yaml b/rms/rmsresourceregistry/service.yaml new file mode 100644 index 0000000..50c17f0 --- /dev/null +++ b/rms/rmsresourceregistry/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-pms-rms-resource-registry + name: csi-pms-rms-resource-registry + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-rms-resource-registry + type: ClusterIP \ No newline at end of file diff --git a/rms/rmsrules/Deployment.yaml b/rms/rmsrules/Deployment.yaml new file mode 100644 index 0000000..1d2fc93 --- /dev/null +++ b/rms/rmsrules/Deployment.yaml @@ -0,0 +1,85 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-rms-rules + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-rms-rules + tier: backend + track: stable + template: + metadata: + labels: + app: csi-rms-rules + tier: backend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-rms-rules + topologyKey: "kubernetes.io/hostname" + containers: + - env: + - name: configserver + valueFrom: + configMapKeyRef: + key: config_server + name: service-configs + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: service-configs + - name: CACHE_TYPE + valueFrom: + configMapKeyRef: + key: cache_type + name: service-configs + - name: hostname + value: csi-pms-rms-rules + - name: FEIGN_HYSTRIX_ENABLED + value: 'false' + - name: SPRING_DATASOURCE_TOMCAT_MIN-EVICTABLE-IDLE-TIME-MILLIS + value: '60000' + - name: SPRING_DATASOURCE_TOMCAT_MAX-ACTIVE + value: '225' + - name: SPRING_DATASOURCE_TOMCAT_MAX-IDLE + value: '40' + - name: SPRING_DATASOURCE_TOMCAT_MIN-IDLE + value: '10' + - name: JAVA_OPTS + value: "-Xms3072m -Xmx3072m" + - name: JVM_OPTS + value: "-Xms3072m -Xmx3072m" + envFrom: + - configMapRef: + name: service-configs + - configMapRef: + name: service-configs-rules + - secretRef: + name: service-configs-secret + - secretRef: + name: service-rules-secret + image: harbor.moh.gov.sa/vidamoh/csi-rms-rules-java-sev:1.0.6 + imagePullPolicy: IfNotPresent + name: csi-rms-rules + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 4Gi + requests: + cpu: 150m + memory: 4Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/rms/rmsrules/hpa.yaml b/rms/rmsrules/hpa.yaml new file mode 100644 index 0000000..ab3dc7f --- /dev/null +++ b/rms/rmsrules/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-rms-rules + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-rms-rules # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "80" \ No newline at end of file diff --git a/rms/rmsrules/kustomization.yaml b/rms/rmsrules/kustomization.yaml new file mode 100644 index 0000000..8624ae3 --- /dev/null +++ b/rms/rmsrules/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml diff --git a/rms/rmsrules/post.yaml b/rms/rmsrules/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/rmsrules/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/rmsrules/service.yaml b/rms/rmsrules/service.yaml new file mode 100644 index 0000000..ca88773 --- /dev/null +++ b/rms/rmsrules/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-pms-rms-rules + name: csi-pms-rms-rules + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-rms-rules + type: ClusterIP \ No newline at end of file diff --git a/rms/rmsui/Deployment.yaml b/rms/rmsui/Deployment.yaml new file mode 100644 index 0000000..7b6b3ea --- /dev/null +++ b/rms/rmsui/Deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-rms-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-rms-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-rms-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-rms-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/rms-ui:4.7.46.2 + imagePullPolicy: IfNotPresent + name: csi-rms-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred diff --git a/rms/rmsui/hpa.yaml b/rms/rmsui/hpa.yaml new file mode 100644 index 0000000..079f161 --- /dev/null +++ b/rms/rmsui/hpa.yaml @@ -0,0 +1,22 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-rms-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-rms-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + # triggers: + # - type: prometheus + # metadata: + # serverAddress: http://prometheus.svc.kubernetes.cluster.local + # metricName: avg_cpu_utilization + # query: | + # avg(rate(container_cpu_usage_seconds_total{pod=~"csi-rms-ui.*", namespace="vida-uat"}[1m])) * 100 + # threshold: "60" diff --git a/rms/rmsui/kustomization.yaml b/rms/rmsui/kustomization.yaml new file mode 100644 index 0000000..d6fe02b --- /dev/null +++ b/rms/rmsui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - service.yaml + - Deployment.yaml +#- hpa.yaml diff --git a/rms/rmsui/post.yaml b/rms/rmsui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/rmsui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/rmsui/service.yaml b/rms/rmsui/service.yaml new file mode 100644 index 0000000..ddb7373 --- /dev/null +++ b/rms/rmsui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-rms-ui-service + name: csi-rms-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-rms-ui + type: ClusterIP diff --git a/rms/setupui/Deployment.yaml b/rms/setupui/Deployment.yaml new file mode 100644 index 0000000..4b91ade --- /dev/null +++ b/rms/setupui/Deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-setup-ui + namespace: moh-prod +spec: + #replicas: 3 + selector: + matchLabels: + app: csi-setup-ui + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-setup-ui + tier: frontend + track: stable + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-setup-ui + topologyKey: "kubernetes.io/hostname" + containers: + - image: harbor.moh.gov.sa/vidamoh/setup-ui:4.9.31.0 + imagePullPolicy: IfNotPresent + name: csi-setup-ui + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/rms/setupui/hpa.yaml b/rms/setupui/hpa.yaml new file mode 100644 index 0000000..2bfec2c --- /dev/null +++ b/rms/setupui/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-setup-ui + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-setup-ui # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 1 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "80" + - type: memory + metadata: + type: Utilization + value: "80" \ No newline at end of file diff --git a/rms/setupui/kustomization.yaml b/rms/setupui/kustomization.yaml new file mode 100644 index 0000000..554aa1a --- /dev/null +++ b/rms/setupui/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +#- hpa.yaml diff --git a/rms/setupui/post.yaml b/rms/setupui/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/rms/setupui/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/rms/setupui/service.yaml b/rms/setupui/service.yaml new file mode 100644 index 0000000..f2df484 --- /dev/null +++ b/rms/setupui/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-setup-ui-service + name: csi-setup-ui-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-setup-ui + type: ClusterIP \ No newline at end of file diff --git a/security/securitycentralauth/Deployment.yaml b/security/securitycentralauth/Deployment.yaml new file mode 100644 index 0000000..2381eeb --- /dev/null +++ b/security/securitycentralauth/Deployment.yaml @@ -0,0 +1,82 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-central-authentication-service + namespace: moh-prod + annothations: + deployment.kubernetes.io/timestamp: "{{ .Release.Time }}" +spec: + replicas: 3 + selector: + matchLabels: + app: csi-central-authentication-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-central-authentication-service + tier: backend + track: stable + spec: + containers: + - env: + - name: active_profile + value: default + - name: configserver + valueFrom: + configMapKeyRef: + key: configserver + name: security-service-configs + - name: hostname + value: csi-central-authentication-service + - 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' + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-central-authentication-service:0.0.16_hotfix2 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: management + scheme: HTTP + initialDelaySeconds: 800 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-central-authentication-service + ports: + - containerPort: 80 + name: http + - containerPort: 9000 + name: management + protocol: TCP + readinessProbe: + httpGet: + path: /actuator/health + port: management + scheme: HTTP + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + resources: + limits: + memory: 2Gi + requests: + cpu: 250m + memory: 950Mi + imagePullSecrets: + - name: regcred diff --git a/security/securitycentralauth/kustomization.yaml b/security/securitycentralauth/kustomization.yaml new file mode 100644 index 0000000..915ed1b --- /dev/null +++ b/security/securitycentralauth/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml diff --git a/security/securitycentralauth/post.yaml b/security/securitycentralauth/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/security/securitycentralauth/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/security/securitycentralauth/service.yaml b/security/securitycentralauth/service.yaml new file mode 100644 index 0000000..18cd1be --- /dev/null +++ b/security/securitycentralauth/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-central-authentication-service + name: csi-central-authentication-service + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-central-authentication-service + type: ClusterIP diff --git a/security/securityiamcache/clusterRole.yaml b/security/securityiamcache/clusterRole.yaml new file mode 100644 index 0000000..9e8f630 --- /dev/null +++ b/security/securityiamcache/clusterRole.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: jgroups-kubeping-pod-reader + namespace: moh-prod +rules: + - apiGroups: + - '' + resources: + - pods + verbs: + - get + - list diff --git a/security/securityiamcache/clusterRoleBinding.yaml b/security/securityiamcache/clusterRoleBinding.yaml new file mode 100644 index 0000000..43097b1 --- /dev/null +++ b/security/securityiamcache/clusterRoleBinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: jgroups-kubeping-api-access +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: jgroups-kubeping-pod-reader +subjects: + - kind: ServiceAccount + name: jgroups-kubeping-service-account + namespace: moh-prod diff --git a/security/securityiamcache/configmap.yaml b/security/securityiamcache/configmap.yaml new file mode 100644 index 0000000..06579f6 --- /dev/null +++ b/security/securityiamcache/configmap.yaml @@ -0,0 +1,562 @@ +apiVersion: v1 +data: + clustered-csi.xml: | + + + + + + + + + + + + + + + + + + + + + + + + + + not-so-secret-password + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + h2 + + sa + sa + + + + + org.h2.jdbcx.JdbcDataSource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + ${jgroups.gossip.initial_hosts:} + + + + + + + false + + + + + + + + + + 360000 + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +kind: ConfigMap +metadata: + name: infinispan-clustered-cm + namespace: moh-prod diff --git a/security/securityiamcache/hpa.yaml b/security/securityiamcache/hpa.yaml new file mode 100644 index 0000000..e00c260 --- /dev/null +++ b/security/securityiamcache/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: infinispan-server + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: StatefulSet # Optional. Default: Deployment + name: infinispan-server # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 2 # Optional. Default: 0 + maxReplicaCount: 2 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/security/securityiamcache/kustomization.yaml b/security/securityiamcache/kustomization.yaml new file mode 100644 index 0000000..7a3239e --- /dev/null +++ b/security/securityiamcache/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- serviceHttp.yaml +- serviceHotrod.yaml +- serviceNodeport.yaml +- secret.yaml +- statefulset.yaml +- configmap.yaml +- hpa.yaml + #- clusterRole.yaml + #- clusterRoleBinding.yaml + #- secret.yaml + #- serviceAccount.yaml \ No newline at end of file diff --git a/security/securityiamcache/post.yaml b/security/securityiamcache/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/security/securityiamcache/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/security/securityiamcache/secret.yaml b/security/securityiamcache/secret.yaml new file mode 100644 index 0000000..1bb464b --- /dev/null +++ b/security/securityiamcache/secret.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: infinispan-server + namespace: moh-prod +stringData: + application-password: changeme + application-user: test diff --git a/security/securityiamcache/serviceAccount.yaml b/security/securityiamcache/serviceAccount.yaml new file mode 100644 index 0000000..1f586e4 --- /dev/null +++ b/security/securityiamcache/serviceAccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: jgroups-kubeping-service-account + namespace: moh-prod diff --git a/security/securityiamcache/serviceHotrod.yaml b/security/securityiamcache/serviceHotrod.yaml new file mode 100644 index 0000000..af23c8c --- /dev/null +++ b/security/securityiamcache/serviceHotrod.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + description: Hot Rod's port. + labels: + application: infinispan-server + name: infinispan-server-hotrod + namespace: moh-prod +spec: + ports: + - port: 11222 + targetPort: 11222 + selector: + deploymentConfig: infinispan-server diff --git a/security/securityiamcache/serviceHttp.yaml b/security/securityiamcache/serviceHttp.yaml new file mode 100644 index 0000000..455986e --- /dev/null +++ b/security/securityiamcache/serviceHttp.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + description: The web server's HTTP port. + labels: + application: infinispan-server + name: infinispan-server-http + namespace: moh-prod +spec: + ports: + - port: 8080 + targetPort: 8080 + selector: + deploymentConfig: infinispan-server diff --git a/security/securityiamcache/serviceNodeport.yaml b/security/securityiamcache/serviceNodeport.yaml new file mode 100644 index 0000000..5978f65 --- /dev/null +++ b/security/securityiamcache/serviceNodeport.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + application: infinispan-server + name: infinispan-server-hotrod-nodeport + namespace: moh-prod +spec: + ports: + - nodePort: 32123 + port: 11222 + protocol: TCP + targetPort: 11222 + selector: + deploymentConfig: infinispan-server + type: NodePort \ No newline at end of file diff --git a/security/securityiamcache/statefulset.yaml b/security/securityiamcache/statefulset.yaml new file mode 100644 index 0000000..ba41267 --- /dev/null +++ b/security/securityiamcache/statefulset.yaml @@ -0,0 +1,93 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + application: infinispan-server + name: infinispan-server + namespace: moh-prod +spec: + selector: + matchLabels: + application: infinispan-server + serviceName: infinispan-server-headless + template: + metadata: + labels: + application: infinispan-server + deploymentConfig: infinispan-server + name: infinispan-server + spec: + containers: + - args: + - clustered-csi + - '-Djboss.default.jgroups.stack=kubernetes' + env: + - name: KUBERNETES_LABELS + value: application=infinispan-server + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SERVER_CONFIGURATION + value: clustered-csi.xml + - name: APP_USER + valueFrom: + secretKeyRef: + key: application-user + name: infinispan-server + - name: APP_PASS + valueFrom: + secretKeyRef: + key: application-password + name: infinispan-server + image: harbor.moh.gov.sa/vidamoh/jboss-infinispan-server:9.4.8.Final + livenessProbe: + exec: + command: + - /usr/local/bin/is_running.sh + failureThreshold: 5 + initialDelaySeconds: 10 + periodSeconds: 60 + successThreshold: 1 + timeoutSeconds: 80 + name: infinispan-server + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 9990 + name: management + protocol: TCP + - containerPort: 8888 + name: ping + protocol: TCP + - containerPort: 11222 + name: hotrod + protocol: TCP + readinessProbe: + exec: + command: + - /usr/local/bin/is_healthy.sh + failureThreshold: 5 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 80 + resources: + requests: + cpu: '0.5' + memory: 512Mi + limits: + memory: 2Gi + volumeMounts: + - mountPath: opt/jboss/infinispan-server/standalone/configuration/clustered-csi.xml + name: config-volume + subPath: clustered-csi.xml + imagePullSecrets: + - name: regcred + serviceAccountName: jgroups-kubeping-service-account + terminationGracePeriodSeconds: 120 + volumes: + - configMap: + name: infinispan-clustered-cm + name: config-volume diff --git a/security/securityiamservice/Deployment.yaml b/security/securityiamservice/Deployment.yaml new file mode 100644 index 0000000..63b4ddb --- /dev/null +++ b/security/securityiamservice/Deployment.yaml @@ -0,0 +1,116 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-iam + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-iam + tier: backend + track: stable + template: + metadata: + labels: + app: csi-iam + tier: backend + track: stable + spec: + containers: + - env: + - name: PROXY_ADDRESS_FORWARDING + value: 'true' + - name: KEYCLOAK_LOGLEVEL + value: INFO + #- name: JGROUPS_DISCOVERY_PROTOCOL + #value: kubernetes.KUBE_PING + #- name: KUBERNETES_NAMESPACE + #valueFrom: + # fieldRef: + # fieldPath: metadata.namespace + #- name: KUBERNETES_LABELS + #value: app=csi-iam + #- name: JGROUPS_DISCOVERY_PROPERTIES + #value: 'port_range=0,dump_requests=true' + - name: KAFKA_BROKERS + valueFrom: + configMapKeyRef: + key: KAFKA_BOOTSTRAP_SERVERS + name: service-configs + - name: INFINISPAN_HOST + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: INFINISPAN_PORT + value: '32123' + - name: apm_server + valueFrom: + configMapKeyRef: + key: apm_server + name: service-configs + - name: service_name + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: GROUP_ID_CONFIG + value: register-1 + - name: JAVA_OPTS + value: >- + -Xms2g -Xmx4g -XX:MetaspaceSize=96M + -XX:+UseG1GC -XX:+UseStringDeduplication + -XX:+HeapDumpOnOutOfMemoryError + -XX:HeapDumpPath=/opt/jboss/memdump + -Djava.net.preferIPv4Stack=true + -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS + -Djava.awt.headless=true + -Djavax.net.ssl.trustStore=/etc/pki/ca-trust/extracted/java/cacerts + -Djavax.net.ssl.trustStorePassword=changeit + -Delastic.apm.server_urls=$(apm_server) -Delastic.apm.service_name="csi-iam" + -Delastic.apm.disable_instrumentations="" -Delastic.apm.application_packages=com.afrunt + -Delastic.apm.environment=$(KUBERNETES_NAMESPACE) -javaagent:/opt/jboss/elastic-apm-agent-1.17.0.jar + - name: REPORTING_ROUTING_KEY + value: '' + envFrom: + - configMapRef: + name: iam-service-configs + - secretRef: + name: iam-service-secret + image: harbor.moh.gov.sa/vidamoh/csi-iam:4.2.104.0 #4.2.100.1 #4.2.99.1 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /auth/ + port: http + initialDelaySeconds: 1200 + failureThreshold: 3 + timeoutSeconds: 10 + name: csi-iam-app + ports: + - containerPort: 8080 + name: http + - containerPort: 8443 + name: https + readinessProbe: + httpGet: + path: auth/realms/master + port: http + initialDelaySeconds: 20 + failureThreshold: 3 + timeoutSeconds: 10 + resources: + limits: + memory: 6Gi + requests: + cpu: 150m + memory: 988Mi + volumeMounts: + - mountPath: /opt/key_files + name: cacerts + imagePullSecrets: + - name: regcred + volumes: + - name: cacerts + projected: + sources: + - secret: + name: iam-cacerts-secret \ No newline at end of file diff --git a/security/securityiamservice/hpa.yaml b/security/securityiamservice/hpa.yaml new file mode 100644 index 0000000..54e28d3 --- /dev/null +++ b/security/securityiamservice/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-iam + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-iam # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 2 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/security/securityiamservice/kustomization.yaml b/security/securityiamservice/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/security/securityiamservice/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/security/securityiamservice/post.yaml b/security/securityiamservice/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/security/securityiamservice/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/security/securityiamservice/service.yaml b/security/securityiamservice/service.yaml new file mode 100644 index 0000000..be52fbb --- /dev/null +++ b/security/securityiamservice/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-iam-service + name: csi-iam-service + namespace: moh-prod +spec: + ports: + - name: http + port: 80 + targetPort: 8080 + - name: https + port: 443 + targetPort: 8443 + selector: + app: csi-iam + type: ClusterIP diff --git a/security/securitymasterdatamgt/Deployment.yaml b/security/securitymasterdatamgt/Deployment.yaml new file mode 100644 index 0000000..42c8e5b --- /dev/null +++ b/security/securitymasterdatamgt/Deployment.yaml @@ -0,0 +1,105 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-master-data-management-service + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-master-data-management-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-master-data-management-service + tier: backend + track: stable + spec: + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: security-service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: configserver + name: security-service-configs + - name: SPRING_DATASOURCE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: security-database-configs + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + key: db-username + name: security-database-secret + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: db-password + name: security-database-secret + - name: SPRING_LIQUIBASE_URL + valueFrom: + configMapKeyRef: + key: database-url + name: security-database-configs + - name: SPRING_LIQUIBASE_USER + valueFrom: + secretKeyRef: + key: db-username + name: security-database-secret + - name: SPRING_LIQUIBASE_PASSWORD + valueFrom: + secretKeyRef: + key: db-password + name: security-database-secret + - name: SPRING_DATASOURCE_driver_class_name + valueFrom: + configMapKeyRef: + key: db-driver + name: security-database-configs + - name: SPRING_DATASOURCE_driverClassName + valueFrom: + configMapKeyRef: + key: db-driver + name: security-database-configs + - name: hostname + value: service-base-masterdata + - name: EUREKA_CLIENT_SERVICEURL_DEFAULTZONE + valueFrom: + configMapKeyRef: + key: eureka_server + name: security-service-configs + - name: EUREKA_INSTANCE_PREFER-IP-ADDRESS + value: 'false' + - name: management_health_refresh_enabled + valueFrom: + configMapKeyRef: + key: management_health_refresh_enabled + name: service-configs + envFrom: + - configMapRef: + name: service-configs + - configMapRef: + name: security-database-configs + - secretRef: + name: security-database-secret + image: harbor.moh.gov.sa/vidamoh/csi-master-data-management-service:0.0.7_hotfix1 + imagePullPolicy: IfNotPresent + name: csi-master-data-management-service + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 1Gi + requests: + cpu: 100m + memory: 535Mi + imagePullSecrets: + - name: regcred diff --git a/security/securitymasterdatamgt/hpa.yaml b/security/securitymasterdatamgt/hpa.yaml new file mode 100644 index 0000000..eb5149c --- /dev/null +++ b/security/securitymasterdatamgt/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-master-data-management-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-master-data-management-service # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 2 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/security/securitymasterdatamgt/kustomization.yaml b/security/securitymasterdatamgt/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/security/securitymasterdatamgt/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/security/securitymasterdatamgt/post.yaml b/security/securitymasterdatamgt/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/security/securitymasterdatamgt/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/security/securitymasterdatamgt/service.yaml b/security/securitymasterdatamgt/service.yaml new file mode 100644 index 0000000..8595ac0 --- /dev/null +++ b/security/securitymasterdatamgt/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: service-base-masterdata + name: service-base-masterdata + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-master-data-management-service + type: ClusterIP diff --git a/security/securityrolespermissions/Deployment.yaml b/security/securityrolespermissions/Deployment.yaml new file mode 100644 index 0000000..763c999 --- /dev/null +++ b/security/securityrolespermissions/Deployment.yaml @@ -0,0 +1,102 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-roles-permissions-management-service + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-roles-permissions-management-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-roles-permissions-management-service + tier: backend + track: stable + spec: + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: security-service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: configserver + name: security-service-configs + - name: EUREKA_INSTANCE_PREFER-IP-ADDRESS + value: 'false' + - name: hostname + value: service-base-role-permission + - name: SPRING_DATA_MONGODB_URI + valueFrom: + configMapKeyRef: + key: permission-mongodb-uri + name: security-database-configs + - name: KAFKA_BOOTSTRAP_SERVERS + valueFrom: + configMapKeyRef: + key: KAFKA_BOOTSTRAP-SERVERS + name: service-configs + - name: KAFKA_ELK_TOPIC + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_TOPIC + name: service-configs + - 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: JAVA_OPTS + value: '-XX:+UnlockExperimentalVMOptions -Xms2g -Xmx2g' + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-roles-permissions-management-service:4.1.1.1 #1.0.3 #1.0.3-hf1 #1.0.3 #1.0.1 + imagePullPolicy: IfNotPresent + name: csi-roles-permissions-management-service + ports: + - containerPort: 80 + name: http + - containerPort: 9000 + name: management + livenessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health + port: management + scheme: HTTP + initialDelaySeconds: 1200 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 10 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health + port: management + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + memory: 3Gi + requests: + cpu: 250m + memory: 2Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/security/securityrolespermissions/hpa.yaml b/security/securityrolespermissions/hpa.yaml new file mode 100644 index 0000000..9a1145a --- /dev/null +++ b/security/securityrolespermissions/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-roles-permissions-management-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-roles-permissions-management-service # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 2 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/security/securityrolespermissions/kustomization.yaml b/security/securityrolespermissions/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/security/securityrolespermissions/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/security/securityrolespermissions/post.yaml b/security/securityrolespermissions/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/security/securityrolespermissions/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/security/securityrolespermissions/service.yaml b/security/securityrolespermissions/service.yaml new file mode 100644 index 0000000..c65881a --- /dev/null +++ b/security/securityrolespermissions/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: service-base-role-permission + name: service-base-role-permission + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-roles-permissions-management-service + type: ClusterIP diff --git a/security/securityuiregistry/Deployment.yaml b/security/securityuiregistry/Deployment.yaml new file mode 100644 index 0000000..b8ed534 --- /dev/null +++ b/security/securityuiregistry/Deployment.yaml @@ -0,0 +1,103 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-ui-registry-service + namespace: moh-prod +spec: + selector: + matchLabels: + app: csi-ui-registry-service + tier: backend + track: stable + template: + metadata: + labels: + app: csi-ui-registry-service + tier: backend + track: stable + spec: + containers: + - env: + - name: active_profile + valueFrom: + configMapKeyRef: + key: activeProfile + name: security-service-configs + - name: configserver + valueFrom: + configMapKeyRef: + key: configserver + name: security-service-configs + - name: hostname + value: service-base-ui-registry + - name: EUREKA_CLIENT_SERVICEURL_DEFAULTZONE + valueFrom: + configMapKeyRef: + key: eureka_server + name: security-service-configs + - name: EUREKA_INSTANCE_PREFER-IP-ADDRESS + value: 'false' + - name: SPRING_DATA_MONGODB_URI + valueFrom: + configMapKeyRef: + key: ui-reg-mongodb-uri + name: security-database-configs + - name: KAFKA_BOOTSTRAP_SERVERS + valueFrom: + configMapKeyRef: + key: KAFKA_BOOTSTRAP-SERVERS + name: service-configs + - name: KAFKA_ELK_TOPIC + valueFrom: + configMapKeyRef: + key: CSI_LOGS_KAFKA_TOPIC + name: service-configs + - 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 + envFrom: + - configMapRef: + name: service-configs + - secretRef: + name: service-configs-secret + image: harbor.moh.gov.sa/vidamoh/csi-ui-registry-service:4.1.1.1 #1.0.0_hotfix1 #1.0.0 + imagePullPolicy: IfNotPresent + name: csi-ui-registry-service + ports: + - containerPort: 80 + name: http + - containerPort: 9000 + name: management + readinessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health + port: management + scheme: HTTP + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 10 + livenessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health + port: management + scheme: HTTP + initialDelaySeconds: 1200 + periodSeconds: 10 + timeoutSeconds: 10 + resources: + limits: + memory: 4Gi + requests: + cpu: 200m + memory: 2Gi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/security/securityuiregistry/hpa.yaml b/security/securityuiregistry/hpa.yaml new file mode 100644 index 0000000..fee177f --- /dev/null +++ b/security/securityuiregistry/hpa.yaml @@ -0,0 +1,23 @@ +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: csi-ui-registry-service + namespace: moh-prod +spec: + scaleTargetRef: + apiVersion: apps/v1 # Optional. Default: apps/v1 + kind: Deployment # Optional. Default: Deployment + name: csi-ui-registry-service # Mandatory. Must be in the same namespace as the ScaledObject + # pollingInterval: 30 # Optional. Default: 30 seconds + cooldownPeriod: 180 # Optional. Default: 300 seconds + minReplicaCount: 2 # Optional. Default: 0 + maxReplicaCount: 6 # Optional. Default: 100 + triggers: + - type: cpu + metadata: + type: Utilization + value: "100" + # - type: memory + # metadata: + # type: Utilization + # value: "90" \ No newline at end of file diff --git a/security/securityuiregistry/kustomization.yaml b/security/securityuiregistry/kustomization.yaml new file mode 100644 index 0000000..b77c252 --- /dev/null +++ b/security/securityuiregistry/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml +- hpa.yaml \ No newline at end of file diff --git a/security/securityuiregistry/post.yaml b/security/securityuiregistry/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/security/securityuiregistry/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/security/securityuiregistry/service.yaml b/security/securityuiregistry/service.yaml new file mode 100644 index 0000000..41c9b56 --- /dev/null +++ b/security/securityuiregistry/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: service-base-ui-registry + name: service-base-ui-registry + namespace: moh-prod +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-ui-registry-service + type: ClusterIP diff --git a/support-portal/support-portal/Deployment.yaml b/support-portal/support-portal/Deployment.yaml new file mode 100644 index 0000000..c7e93fe --- /dev/null +++ b/support-portal/support-portal/Deployment.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-support-portal + namespace: moh-prod +spec: + #replicas: 1 + selector: + matchLabels: + app: csi-support-portal + tier: frontend + track: stable + template: + metadata: + labels: + app: csi-support-portal + module: support-portal + tier: frontend + track: stable + spec: + containers: + - image: harbor.moh.gov.sa/vidamoh/csi-support-portal:2.0.0.0 + imagePullPolicy: IfNotPresent + name: csi-support-portal + ports: + - containerPort: 80 + name: http + resources: + limits: + memory: 100Mi + requests: + cpu: 2m + memory: 25Mi + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/support-portal/support-portal/hpa.yaml b/support-portal/support-portal/hpa.yaml new file mode 100644 index 0000000..06d7405 Binary files /dev/null and b/support-portal/support-portal/hpa.yaml differ diff --git a/support-portal/support-portal/kustomization.yaml b/support-portal/support-portal/kustomization.yaml new file mode 100644 index 0000000..58e34b7 --- /dev/null +++ b/support-portal/support-portal/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- service.yaml +- Deployment.yaml \ No newline at end of file diff --git a/support-portal/support-portal/post.yaml b/support-portal/support-portal/post.yaml new file mode 100644 index 0000000..6f19639 --- /dev/null +++ b/support-portal/support-portal/post.yaml @@ -0,0 +1,16 @@ +apiVersion: batch/v1 +kind: Job +metadata: + generateName: test-suite- + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: bvt-suite + image: curlimages/curl + command: + restartPolicy: Never + backoffLimit: 2 diff --git a/support-portal/support-portal/service.yaml b/support-portal/support-portal/service.yaml new file mode 100644 index 0000000..55866d7 --- /dev/null +++ b/support-portal/support-portal/service.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: csi-support-portal + name: csi-support-portal + namespace: moh-uat +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: csi-support-portal + type: ClusterIP \ No newline at end of file