apiVersion: apps/v1
kind: Deployment
metadata:
  name: maestro-worker
  annotations:
      deployment.kubernetes.io/revision: "1"
spec:
  replicas: 0
  selector:
    matchLabels:
      component: worker
      app: maestro
  template:
    metadata:
      labels:
        component: worker
        app: maestro
    spec:
#      strategy:
#        type: Recreate
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            preference:
              matchExpressions:
              - key: maestro-node-role
                operator: In
                values:
                - worker
      containers:
      - name: worker
        image: maestroperf/maestro-worker:edge
        imagePullPolicy: Always
        env:
        - name: MAESTRO_BROKER
          value: mqtt://broker
        volumeMounts:
        - mountPath: /maestro
          name: data
      volumes:
      - name: data
        emptyDir: {}