---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tripbot
spec:
  selector:
    matchLabels:
      app: tripbot
  template:
    spec:
      containers:

      - name: tripbot
        imagePullPolicy: Always
        env:
         - name: ENV
           value: "production"
         - name: CHANNEL_NAME
           value: "adanalife_"
         - name: OUTPUT_CHANNEL
           value: "adanalife_staging"
         - name: BOT_USERNAME
           value: "Tripbot4000"
         - name: VLC_SERVER_HOST
           value: "10.4.20.195:8088" # stream server's VLC

        volumeMounts:
        # mount prod-dotenv volume to /opt/tripbot
        - name: prod-dotenv
          mountPath: /opt/tripbot/.env.production
          readOnly: true
          subPath: .env.production
        # mount google-creds secret
        - name: google-creds
          mountPath: /opt/tripbot/infra/google
          readOnly: true

      volumes:
      - name: prod-dotenv
        configMap:
          name: prod-dotenv
          items:
            - key: prod-dotenv
              path: .env.production
      - name: google-creds
        secret:
          secretName: prod-google-creds
