apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: ades
  name: ades-deployment
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: ades
  template:
    metadata:
      labels:
        app: ades
    spec:
      containers:
        - name: ades
          envFrom:
            - configMapRef:
                name: ades-config
          image: eoepca/proc-ades:0.2
          imagePullPolicy: Always
          resources:
            requests:
              memory: "2Gi"
              cpu: "1"
              # ephemeral-storage: "2Gi"
            limits:
              memory: "4Gi"
              cpu: "2"
              # ephemeral-storage: "5Gi"
          ports:
            - containerPort: 80
          volumeMounts:
            - name: ades-config
              mountPath: /var/etc/ades
            - name: ades-user-data
              mountPath: /var/www/html/res
            - name: ades-processing-services
              mountPath: /opt/zooservices_user
      volumes:
        - name: ades-config
          persistentVolumeClaim:
            claimName: ades-config-pv-claim
        - name: ades-user-data
          persistentVolumeClaim:
                claimName: ades-user-data-pv-claim
        - name: ades-processing-services
          persistentVolumeClaim:
                claimName: ades-processing-services-pv-claim
      restartPolicy: Always

