apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    version: "0a88de5263fcec9cfb5fe5a3f1572eec3adc6712"
    razee.io/git-repo: "https://github.com/razee-io/Watch-keeper.git"
    razee.io/commit-sha: "0a88de5263fcec9cfb5fe5a3f1572eec3adc6712"
  name: watch-keeper
  labels:
    razee/watch-resource: "lite"
spec:
  replicas: 1
  revisionHistoryLimit: 0
  selector:
    matchLabels:
      app: watch-keeper
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: watch-keeper
        razee/watch-resource: "lite"
      name: watch-keeper
    spec:
      serviceAccountName: watch-keeper-sa
      containers:
      - env:
          - name: START_DELAY_MAX
            valueFrom:
              configMapKeyRef:
                name: watch-keeper-config
                key: START_DELAY_MAX
                optional: true
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: RAZEEDASH_URL
            valueFrom:
              configMapKeyRef:
                name: watch-keeper-config
                key: RAZEEDASH_URL
          - name: RAZEEDASH_ORG_KEY
            valueFrom:
              secretKeyRef:
                name: watch-keeper-secret
                key: RAZEEDASH_ORG_KEY
          - name: NODE_ENV
            value: "production"
        image: "quay.io/razee/watch-keeper:0.5.2"
        imagePullPolicy: Always
        name: watch-keeper
        resources:
          limits:
            memory: 500Mi
            cpu: 400m
          requests:
            memory: 100Mi
            cpu: 50m
        livenessProbe:
          exec:
            command:
            - sh/liveness.sh
          initialDelaySeconds: 600
          periodSeconds: 300
          timeoutSeconds: 30
          failureThreshold: 1
        volumeMounts:
        - mountPath: /usr/src/app/limit-poll
          name: limit-poll
        - mountPath: /usr/src/app/non-namespaced
          name: non-namespaced
      volumes:
      - configMap:
          defaultMode: 420
          name: watch-keeper-limit-poll
        name: limit-poll
      - configMap:
          defaultMode: 420
          name: watch-keeper-non-namespaced
        name: non-namespaced
