score-spec / score-compose

Reference implementation for docker-compose target platform support
https://score.dev/
Apache License 2.0
445 stars 40 forks source link

feat: added kafka-topic provisioner #150

Closed astromechza closed 3 months ago

astromechza commented 3 months ago

See the newly added example in examples/13-kafka-topic. This provisions a 3-partition kafka topic on a random host.

$ go run ../../cmd/score-compose resources list
dns.default#hello-world.dns
kafka-topic.default#hello-world.bus
route.default#hello-world.route

$ go run ../../cmd/score-compose resources get-outputs 'kafka-topic.default#hello-world.bus'
{"host":"kafka-e9KQfd","name":"topic-lTppsn","num_partitions":3,"port":"9092"}

You can see in the example screenshot that the redpanda console can connect to it successfully:

Screenshot 2024-06-05 at 16 36 41

Fixes #149