apiVersion: apps/v1
kind: Deployment
metadata:
  name: tweet-processor
  namespace: pipeline
  labels:
    app: tweet-processor
    demo: pipeline
spec:
  selector:
    matchLabels:
      app: tweet-processor
  template:
    metadata:
      labels:
        app: tweet-processor
        demo: pipeline
      annotations:
        dapr.io/enabled: "true"
        dapr.io/app-id: "tweet-processor"
        dapr.io/app-protocol: "grpc"
        dapr.io/app-port: "60002"
        dapr.io/config: "space-config"
        dapr.io/log-as-json: "true"
        dapr.io/log-level: "debug"
    spec:
      containers:
      - name: service
        image: mchmarny/tweet-processor:v0.11.1
        ports:
        - containerPort: 60002
        env:
        - name: SOURCE_PUBSUB_NAME
          value: "tweeter-pubsub"
        - name: SOURCE_TOPIC_NAME
          value: "tweets"
        - name: RESULT_PUBSUB_NAME
          value: "processed-tweets-pubsub"
        - name: RESULT_TOPIC_NAME
          value: "processed-tweets"
        - name: SENTIMENT_SERVICE_NAME
          value: "sentiment-scorer"