apiVersion: apps/v1
kind: Deployment
metadata:
  name: collab-listener
spec:
  replicas: 1
  selector:
    matchLabels:
      app: collab-listener
  template:
    metadata:
      labels:
        app: collab-listener
    spec:
      containers:
      - name: collab-listener
        image: slaclab/explgbk-collab-listener:20200501.0
        imagePullPolicy: Always
        env:
        - name: KAFKA_BOOTSTRAP_SERVER
          value: cp-kafka:9092
        - name: KAFKA_TOPIC
          value: roles
        - name: KAFKA_GROUP_ID
          value: roles
        - name: EXP_DIR
          value: /expdata/
        - name: LOGBOOK_URI
          value: https://cryoem-logbook.slac.stanford.edu
        - name: USERNAME
          valueFrom:
            secretKeyRef:
              name: collab-listener
              key: username
        - name: PASSWORD
          valueFrom:
            secretKeyRef:
              name: collab-listener
              key: password 
        volumeMounts:
        - name: exp-data
          mountPath: /expdata/
      volumes:
      - name: exp-data
        persistentVolumeClaim:
          claimName: cryoem-logbook--exp


