cilium-cli
cilium-cli copied to clipboard
Add validation for Field in --config
Add validation for Field key and value when use cilium install --config=key=value
cc @gandro @tklauser
@zhaojizhuang What kind of validation are you thinking of?
The keys and values refer to ConfigMap entries and might differ depending on Cilium version, which makes validation quite cumbersome. I'd like to avoid having a full copy of all possible ConfigMap values for multiple Cilium versions in cilium-cli. Also, we should get an error from Cilium on installation if an invalid field was specified.
What kind of validation are you thinking of?
@tklauser I think the validation of field key which can be set in configmap is ok. Allow the known key and deny the unknown key
As mentioned above, this will require us to keep a copy of valid ConfigMap keys for different Cilium versions in cilium-cli. I'd prefer to avoid that. Given that cilium install --config is primarily targeted at advanced users and our CI, I think doing the validation on the Cilium side (rather than the CLI) is reasonable.
@tklauser Yeah, it is more reasonable to verify on the cilium side, where do you think we can add the validation? Add an webhook component ?