kudobuilder / kudo

Kubernetes Universal Declarative Operator (KUDO)
https://kudo.dev
Apache License 2.0
1.17k stars 103 forks source link

Overriding single entries of a map param using "kudo update" command #1750

Open dboyleitrs opened 3 years ago

dboyleitrs commented 3 years ago

What would you like to be added: Support for overriding single entries of a map (with lists sometimes) parameter via the kubectl kudo update -p command.

Why is this needed: We have introduced a number of map parameters into our operator in favor of individual parameters for each entry in the map. After our application is deployed, there are times when we'd like to change just one entry in the map.

We know we can put the entire current map value, along with the change and issue the -P updated-map-param.yaml command, but this inconvenient for end-users as they need to know what the full current value is.

Instead, we'd love to be able to issue -p MAP_PARAM.key1.value2='new_value'. We've tried this already and it has no affect.

Also, when there are lists in our maps, we'd like to refer to them by index and issue something like -p MAP_PARAM.people[1].first_name='new_name'