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