apiVersion: apps/v1
kind: Deployment
metadata:
  name: akvo-exact
spec:
  replicas: 1
  selector:
    matchLabels:
      run: akvo-exact
      app: akvo-exact
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        run: akvo-exact
        akvo-exact-version: ${TRAVIS_COMMIT}
        app: akvo-exact
    spec:
      containers:
      - name: akvo-exact
        image: eu.gcr.io/akvo-lumen/akvo-exact:${TRAVIS_COMMIT}
        resources:
          requests:
            cpu: "100m"
          limits:
            cpu: "500m"
        ports:
        - containerPort: 8080
          protocol: TCP
        volumeMounts:
          - name: "secret-config"
            mountPath: "/resources"
            readOnly: true
      volumes:
         - name: "secret-config"
           secret:
             secretName: "akvo-exact-secret"