apiVersion: apps/v1
kind: Deployment
metadata:
  name: heimdall-hubot-deployment
  labels:
    app: hubot
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hubot
  template:
    metadata:
      labels:
        app: hubot
    spec:
      containers:
        - name: hubot
          # image: gcr.io/thesis-ops-2748/heimdall:USE_CIRCLE_CI_BUILDS
          env:
            - name: HUBOT_CIRCLECI_TOKEN
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: circle_ci_token
            - name: HUBOT_FLOWDOCK_API_TOKEN
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: flowdock_token
            - name: HUBOT_HOST
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: host
            - name: HUBOT_SCHEDULE_DEBUG
              value: "1"
            - name: RELEASE_NOTIFICATION_ROOM
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: heimdall_alert_flow
            - name: SUGGESTION_ALERT_ROOM # Name of room for suggestion posts
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: heimdall_alert_flow
            - name: REDIS_URL
              value: $(HEIMDALL_REDIS_SERVICE_PORT)
            - name: GITHUB_CLIENT_ID
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: github_client_id
            - name: GITHUB_CLIENT_SECRET
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: github_client_secret
            - name: IMGFLIP_API_USERNAME
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: imgflip_api_username
            - name: IMGFLIP_API_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: imgflip_api_password
            - name: ZOOM_API_KEY
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: zoom_api_key
            - name: ZOOM_API_SECRET
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: zoom_api_secret
            - name: ZOOM_EXPECTED_MEETING_DURATION
              value: "60"
            - name: CONTRACT_OWNER_ADDRESS
              value: "0x923C5Dbf353e99394A21Aa7B67F3327Ca111C67D"
            - name: CONTRACT_OWNER_ETH_ACCOUNT_PRIVATE_KEY
              valueFrom:
                secretKeyRef:
                  name: heimdall-hubot
                  key: contract_owner_eth_account_private_key
            - name: ETH_HOST_URL
              value: "https://ropsten.infura.io/v3/59fb36a36fa4474b890c13dd30038be5"
            - name: ETH_FAUCET_AMOUNT
              value: "5"
          ports:
            - containerPort: 8080
          resources:
            limits:
              cpu: "0.1"
