Closed benpankow closed 3 years ago
But if I configure the qty
from env key, it won't be able to convert it to the correct type, all of the passing values will be string
only.
{
"version": "1.0.0",
"title": "Randomly kill pods by percentage",
"description": "Randomly kill pods by percentage.",
"configuration": {
"target_terminate_percentage": {
"type": "env",
"key": "TARGET_KILL_PERCENTAGE"
}
}
}
apiVersion: v1
kind: Secret
metadata:
name: chaos-exp-env
namespace: chaostoolkit-run
stringData:
TARGET_KILL_PERCENTAGE: "50"
Unless i'm mistaken, environment variables are all strings.
It would be nice to be able to configure
qty
orrequest_timeout
parameters for my experiments using the Kubernetes driver. Unfortunately, current variable substitution only works in strings, and the driver does not accept strings as input for these parameters.It would be helpful if actions/probes would be expected to cast string inputs for non-string parameters. Alternatively, the chaos lib could provide a way to substitute config/secret variables of other types, in particular floats.