We have application with huge configuration (this is just a part):
apiVersion: v1
kind: ConfigMap
metadata:
name: my-app
data:
application.yaml: |-
config:
app: MY-APP
my-custom-map:
KEY1: value1
KEY2: value2
KEY3: value3
KEY4: value4
something1: true
something2: 123
something3: string123
something4: null
subclass:
anotherMap:
"[AAA:0.0.1,BBB:CCC]": "DDD:EEEE"
subclass2:
something4: AAAA
anotherMap2:
0.0.3: 0.0.3
I follow this example to bind configmap with spring boot configuration but there is still some problem for example how to solve null in yaml which spring yaml postprocessor resolve as empty string: issue
second problem is how to handle this configmap. I know I can edit and then use apply but this can lead to some error. Is there some tool which I can use to edit this yaml and make some bash script for editing ? like: ./my-script.sh -function addMyCustomMapValue -args "KEY5:value5" . I tried to explore yq but I think there is some limitation and it is hard to use for some use-case and then kustomize which I think is good for creating configmap but not for editing existing one.
Is there already some good example for this use-case ?