apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  name: micro-bot
  labels:
    micro: runtime
    name: micro-bot
  annotations:
    name: 'go.micro.bot'
    version: 'latest'
    source: 'github.com/itzmanish/micro'
    owner: 'micro'
    group: 'micro'
spec:
  replicas: 1
  selector:
    matchLabels:
      name: micro-bot
      micro: runtime
  template:
    metadata:
      labels:
        name: micro-bot
        micro: runtime
    spec:
      containers:
        - name: bot
          command: ['/micro', 'bot', '--inputs=slack']
          image: micro/micro
          imagePullPolicy: Always
          env:
            - name: MICRO_AUTH
              value: 'service'
            - name: MICRO_AUTH_PUBLIC_KEY
              valueFrom:
                secretKeyRef:
                  name: micro-keypair
                  key: public
            - name: MICRO_BROKER
              value: 'nats'
            - name: MICRO_BROKER_ADDRESS
              value: 'nats-cluster'
            - name: MICRO_REGISTRY
              value: 'etcd'
            - name: MICRO_REGISTRY_ADDRESS
              value: 'etcd-cluster-client'
            - name: MICRO_SLACK_TOKEN
              valueFrom:
                secretKeyRef:
                  name: micro-slack
                  key: token
