chaostoolkit-incubator / community-playground

Contains the Chaos Toolkit Community Playground Project
Apache License 2.0
54 stars 17 forks source link

How can I express int/float parameters as JSON? #25

Closed torumakabe closed 5 years ago

torumakabe commented 5 years ago

I tried kubernetes-pack/kill-pods-experiment.json sample and got problems about int/float parameters. For instance, I have not found way to express service_url_timeout in probe as JSON yet. ${service_url_timeout} is invalid expression as JSON and "${service_url_timeout}" is not float.

There are some int/float parameters in sample configuration as environment variables, but these are not used in probes and actions and as literal. How can I express int/float parameters as JSON in Chaos Toolkit?

Thanks in advance.

Lawouach commented 5 years ago

Hello @ToruMakabe

A very good question and I'm glad you know about the way to express variables. You are right about the limitation. To be fair, for once, I don't have a direct way of achiveing this. I guess one could argue that the function taking the value should cast to the appropriate type but, that might make the validation happy.

I need to think about it.

torumakabe commented 5 years ago

@Lawouach I got it, thanks. I think we should remove int/float parameters in sample configuration to avoid misleading. I will do PR later.