How replace specific property value in an array's item in Helm values.yaml on command line instead of the entire array/map?

Viewed 619

When I try to override only a specific value in a map item inside an array in my values.yaml, it replaces the entire thing and makes it have only that one property. Is there a way to keep the defaults and only override part?

My values.yaml has:

envVariables:
  - name: MYSQL_ROOT_PASSWORD
    secretKey:
      name: creds
      data:
        - name: username
          value: root
        - name: password
          value: REPLACE_ME

I want to replace the password value only at the command line, but instead it changes the entire structure to only have envVariables[0].secretKey.data[1].value. The property name: MYSQL_ROOT_PASSWORD is gone along with everything else I didn't pass.

helm template ./testchart --set envVariables[0].secretKey.data[1].value=pass
0 Answers
Related