[feature request] `supported_params` and `expected_outputs` for `cmd` provisioners
Currently when we are doing
score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/score-k8s/10-redis-helm-upgrade.provisioners.yaml
the score-compose provisioners list don't display outputs because it is not supported
+-------+-------+--------+---------+-------------+
| TYPE | CLASS | PARAMS | OUTPUTS | DESCRIPTION |
+-------+-------+--------+---------+-------------+
| redis | | | | |
+-------+-------+--------+---------+-------------+
Leaving this one to anyone who would like to take the opportunity to tackle a good first issue and help wanted issue. The goal is to back port what was done in score-k8s there: https://github.com/score-spec/score-k8s/pull/156, in this repo here.
@mathieu-benoit started to work on it
@astromechza @mathieu-benoit need some insight here
I tested this locally based on main without any changes
start a init
go run cmd/score-compose/main.go init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/score-compose/10-redis-dapr-pubsub.provisioners.yaml
then
go run cmd/score-compose/main.go provisioners list
+---------------+---------+------------------+--------------------------------+--------------------------------+
| TYPE | CLASS | PARAMS | OUTPUTS | DESCRIPTION |
+---------------+---------+------------------+--------------------------------+--------------------------------+
...
+---------------+---------+------------------+--------------------------------+--------------------------------+
| dapr-pubsub | default | | name | Generates a Redis Service |
| | | | | and a Dapr PubSub Component |
| | | | | pointing to this Redis |
| | | | | Service. |
+---------------+---------+------------------+--------------------------------+--------------------------------+
......
in the file shared in slack https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/score-k8s/10-redis-helm-upgrade.provisioners.yaml there is only one row to help determine what are the expected outputs
OUTPUTS='{"resource_outputs":{"host":"%s-master", "port":"6379", "username":"", "password":"🔐💬%s_redis-password💬🔐"},"manifests":[]}'
what would be the best approach to have expected_outputs ?
Yup, exactly, what about adding the expected_outputs in the cmd like we have with the template, like this below?
- uri: template://...
description: ...
type: ....
class: ...
init:...
state: ...
outputs:...
expected_outputs:...
- uri: cmd://...
type:...
args:...
expected_outputs:...
Hey @lekaf974, have you started anything here? If not, I would love to see if someone during the ContribFest at KubeCon this week would be able to take this one. Do you mind? If nobody, I'll reassign to you after this week?
Not yet, feel free to assigned to someone else. Busy on my end currently
Leaving this one to anyone who would like to take the opportunity to tackle a good first issue and help wanted issue. The goal is to back port what was done in score-k8s there: https://github.com/score-spec/score-k8s/pull/156, in this repo here.
Hi, I'd like to take up this issue
Sure thing, @mageshwaransekar, thanks for raising your hand on this one!
Please do let us know if you have any questions. This should provide you already great guidance:
The goal is to back port what was done in score-k8s there: https://github.com/score-spec/score-k8s/pull/156, in this repo here.
Hi @mageshwaransekar, is there anything we can help you with to get started on this? Just making sure you have all the information needed ;)
Note: this will allow to support this https://github.com/score-spec/community-provisioners/blob/main/dns/score-compose/10-dns-in-codespace.provisioners.yaml#L13-L15.
Hi @mathieu-benoit, I'll start working on it this week as I was busy last week
Hi @mageshwaransekar, just checking that you have all the information needed to start working on this? If it's not a good timing for you to contribute to this one, no worries, we can assign it to someone else and find you another one when you'll be ready. Thanks!
Now opening to anyone who would like to pick up this one.
The goal is to back port what was done in score-k8s there: https://github.com/score-spec/score-k8s/pull/156, in this repo here. Note: this will allow to support this https://github.com/score-spec/community-provisioners/blob/main/dns/score-compose/10-dns-in-codespace.provisioners.yaml#L13-L15.
@mathieu-benoit got some times to work on this, already started