---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: keel
  namespace: kube-system
  labels:
      name: "keel"
spec:
  replicas: 1
  template:
    metadata:
      name: keel
      labels:
        app: keel
    spec:
      serviceAccountName: keel
      containers:
        - image: keelhq/keel:0.8.3
          imagePullPolicy: Always
          env:
            # - name: POLL
            #   value: "1"
            - name: PUBSUB
              value: "1"
            # how to setup : https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform  
            # - name: GOOGLE_APPLICATION_CREDENTIALS 
            #   value: ""  
            # Enable/disable Helm provider
            # - name: HELM_PROVIDER
            #   value: "1"
            - name: PROJECT_ID
              value: "my-project-id"
            # - name: WEBHOOK_ENDPOINT
            #   value: https://my.webhookrelay.com/v1/webhooks/2fc52b16-75f7-41f2-8e2d-81afbbcae709
            # - name: SLACK_TOKEN
            #   value: your-token-here
            # - name: SLACK_CHANNELS
            #   value: general
            # - name: SLACK_APPROVALS_CHANNEL
            #   value: approvals
            # - name: HIPCHAT_TOKEN
            #   value: your-token-here
            # - name: HIPCHAT_CHANNELS
            #   value: keel-bot
            # - name: HIPCHAT_APPROVALS_CHANNEL
            #   value: "111111_keel-approvals@conf.hipchat.com"
            # - name: HIPCHAT_APPROVALS_BOT_NAME
            #   value: "Mr Bor"
            # - name: HIPCHAT_APPROVALS_USER_NAME
            #   value: "111111_2222222"
            # - name: HIPCHAT_APPROVALS_PASSWORT
            #   value: "pass"
            # - name: MATTERMOST_ENDPOINT
            #   value: "" 
          name: keel
          command: ["/bin/keel"]
          ports:
            - containerPort: 9300
          livenessProbe:
            httpGet:
              path: /healthz
              port: 9300
            initialDelaySeconds: 30
            timeoutSeconds: 10
