knative / client-contrib

Community contributed `kn` plugins.
Apache License 2.0
10 stars 23 forks source link

[kafka] bootstrapServers and Topics to accept arrays #85

Open daisy-ycguo opened 3 years ago

daisy-ycguo commented 3 years ago

Because kafkasource: change bootstrapServers and Topics to accept arrays is enabled in back-end, we shall modify client to support the changes.

Or else, we will get failure when creating a kafka source:

$./kn source kafka create mykafkasrc --servers my-cluster-kafka-bootstrap.kafka.svc:9092 --topics test-topic --consumergroup test-consumer-group
Error: cannot create KafkaSource 'mykafkasrc' in namespace 'default' because: admission webhook "defaulting.webhook.kafka.sources.knative.dev" denied the request: mutation failed: cannot decode incoming new object: json: cannot unmarshal string into Go struct field KafkaSourceSpec.spec.bootstrapServers of type []string
navidshaikh commented 3 years ago

/assign