apiVersion: apps/v1
kind: Deployment
metadata:
  name: dapr-workflows-host
  labels:
    app: dapr-workflows-host
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dapr-workflows-host
  template:
    metadata:
      labels:
        app: dapr-workflows-host
      annotations:
        dapr.io/id: "workflows"
        dapr.io/enabled: "true"
        dapr.io/port: "50003"
        dapr.io/protocol: "grpc"
    spec:
      containers:
      - name: host
        image: daprio/workflows:0.2.1
        env:
        - name: STORAGE_ACCOUNT_KEY
          valueFrom:
            secretKeyRef:
              name: dapr-workflows
              key: accountKey
        - name: STORAGE_ACCOUNT_NAME
          valueFrom:
            secretKeyRef:
              name: dapr-workflows
              key: accountName
        command: ["dotnet"]
        args: ["app/Dapr.Workflows.dll", "--workflows-path", "/workflows"]
        ports:
        - containerPort: 50003
        imagePullPolicy: Always
        volumeMounts:
        - name: workflows
          mountPath: /workflows
      volumes:
        - name: workflows
          configMap:
            name: workflows
