apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: matteraway
    tier: app
  name: matteraway-app
  namespace: matteraway
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: matteraway
      tier: app
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: matteraway
        tier: app
      name: matteraway-app
    spec:
      containers:
      - image: ctadeu/matteraway:0.1.0
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /ping
            port: 8087
            scheme: HTTP
          initialDelaySeconds: 90
          periodSeconds: 15
          successThreshold: 1
          timeoutSeconds: 1
        name: matteraway-app
        ports:
        - containerPort: 8087
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /ping
            port: 8087
            scheme: HTTP
          initialDelaySeconds: 5
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /app/config
          name: matteraway-config
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      volumes:
      - configMap:
          defaultMode: 420
          items:
          - key: config-away.json
            path: config-away.json
          name: matteraway-config
        name: matteraway-config
