Merge of default customEnvs and service specific custonEnvs does not work

Hi,

When defining both default.customEnvs variables and deployments.customEnvs, only the values from deployments.customEnvs are included in the result, which is unexpected, I expect all values to be present.

A merge of both variables is done here

I have created example to reproduce the bug on master (55b8e3c01f317c10426273de23b6e3c67b0d799f).

Run following command with the uploaded files values.yaml and overrides.yaml:

helm template mender -f values.yaml -f overrides.yaml -s templates/deployments/deployment.yaml

values.yaml (2.1 KB)
overrides.yaml (182 Bytes)

default:
  customEnvs:
    - name: LOG_FORMAT
      value: "json"

deployments:
  customEnvs:
    - name: DEPLOYMENTS_STORAGE_PROXY_URI
      value: "https://storage.googleapis.com"

output.yaml (3.0 KB)

I expect the result to be:

        env:
        - name: DEPLOYMENTS_STORAGE_DEFAULT
          value: "aws"
        - name: DEPLOYMENTS_INVENTORY_ADDR
          value: http://mender-inventory:8080
        - name: DEPLOYMENTS_MIDDLEWARE
          value: "prod"
        - name: DEPLOYMENTS_AWS_TAG_ARTIFACT
          value:
        - name: DEPLOYMENTS_STORAGE_ENABLE_DIRECT_UPLOAD
          value: "true"
        - name: DEPLOYMENTS_STORAGE_PROXY_URI
          value: "https://mender.einride.dev"
        - name: DEPLOYMENTS_STORAGE_PROXY_URI
          value: https://storage.googleapis.comlol
        - name: LOG_FORMAT              <=== I expect this to be rendered.
          value: json                   <=== I expect this to be rendered.

Do I have the right expectations or do have I missed something?