mchmarny / dapr-demos

Collection of personal Dapr demos (bindings, state, pub/sub, service-to-service invocation)
https://dapr.io
MIT License
167 stars 47 forks source link

Applying deployment/kafka-pubsub.yaml with a specification validation error #12

Open tpiperatgod opened 3 years ago

tpiperatgod commented 3 years ago

Hi, I'm experimenting with the autoscaling-on-queue example and I got the following error when I got to step Deployment

~# kubectl apply -f deployment/kafka-pubsub.yaml

error: error validating "deployment/kafka-pubsub.yaml": error validating data: ValidationError(Component.spec): missing required field "version" in io.dapr.v1alpha1.Component.spec; if you choose to ignore these errors, turn validation off with --validate=false

Should it be changed to this?

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: autoscaling-pubsub
spec:
  version: v1
  type: pubsub.kafka
  metadata:
    - name: brokers
      value: kafka-cp-kafka.kafka.svc.cluster.local:9092
    - name: authRequired
      value: "false"
    - name: allowedTopics
      value: metric
    - name: consumerID
      value: autoscaling-subscriber

thk.

tpiperatgod commented 3 years ago

To add, I am currently using: