apiVersion: apps/v1
kind: Deployment
metadata:
  name: task-controller
  labels:
    app: task-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: task-controller
  template:
    metadata:
      labels:
        app: task-controller
    spec:
      containers:
        - name: task-controller
          image: task-controller
          imagePullPolicy: Never
          env:
            - name: LOG_LEVEL
              value: "10"
            - name: HOST
              valueFrom:
                configMapKeyRef:
                  name: task-controller-config
                  key: redis_host
            - name: PORT
              valueFrom:
                configMapKeyRef:
                  name: task-controller-config
                  key: redis_port
            - name: CHANNELS
              valueFrom:
                configMapKeyRef:
                  name: task-controller-config
                  key: channels
          ports:
            - containerPort: 8080
