apiVersion: apps/v1
kind: Deployment
metadata:
  name: gbv-botserver
  labels:
    app: gbv-botserver
spec:
  replicas: 2
  selector:
    matchLabels:
      app: gbv-botserver
  template:
    metadata:
      labels:
        app: gbv-botserver
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - gbv-botserver
            topologyKey: "kubernetes.io/hostname"
      containers:
      - name: gbv-botserver
        image: vlabresearch/botserver:0.0.4
        resources:
          requests:
            cpu: "25m"
            memory: "50Mi"
        ports:
        - containerPort: 80
        envFrom:
        - secretRef:
            name: gbv-bot-envs
        env:
        - name: BOTSERVER_EVENT_TOPIC
          value: "chat-events"
        - name: KAFKA_BROKERS
          value: "spinaltap-kafka:9092"
