apiVersion: apps/v1
kind: Deployment
metadata:
  name: supervisor
  labels:
    app: supervisor
spec:
  replicas: 1
  selector:
    matchLabels:
      app: supervisor
  template:
    metadata:
      labels:
        app: supervisor
    spec:
      containers:
        - image: 279559645400.dkr.ecr.us-west-1.amazonaws.com/solui/supervisor:G8R2i020
          imagePullPolicy: Always
          name: supervisor
          ports:
            - containerPort: 5020
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /supervisor/health
              port: 5020
            initialDelaySeconds: 15
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 30
          resources:
            requests:
              cpu: 100m
              memory: 100Mi
          volumeMounts:
            - mountPath: /opt/ibaset/solumina-web-supervisor/config/.env
              subPath: .env
              name: supervisor-mount
              readOnly: True

      volumes:
        - name: supervisor-mount
          configMap:
            name: supervisor-cm
            items:
              - key: supervisorConfig
                path: .env

      restartPolicy: Always
