apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: iot-frontend
    app.kubernetes.io/part-of: ManuELA
  name: iot-frontend
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      deploymentconfig: iot-frontend
  template:
    metadata:
      labels:
        app: iot-frontend
        deploymentconfig: iot-frontend
    spec:
      containers:
      - image: iot-frontend:latest
        #imagePullPolicy: Always
        name: iot-frontend
        ports:
        - containerPort: 8080
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        livenessProbe: 
          httpGet:   
            path: /home
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 15  
          timeoutSeconds: 1
          periodSeconds: 10
          successThreshold: 1
          failureThreshold: 3
        readinessProbe:
          httpGet:
            path: /home
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 15
          timeoutSeconds: 1
          periodSeconds: 10
          successThreshold: 1
          failureThreshold: 3
        volumeMounts:
            - mountPath: /opt/app-root/output/conf/config.json
              name: iot-frontend-cfg-vol
              subPath: config.json
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - name: iot-frontend-cfg-vol
        configMap:
          defaultMode: 438
          name: iot-frontend-cfg
