Kubernetes Calling multiple values with the same name Helm Charts

Viewed 39

We have two networks that suppose to use the sane name ClientApp but different values in the values.yaml file. The network_a works when on a particular network.

For example a user with a particular laptop with network_a can access the application url and can access network-a.co.uk URL. but the issue is that another type of laptop require network_b and we do not want to overrides network_a in the values.yaml file but define also the network_b in order to access application in network-b.co.uk.

deployment.yaml

  env:

      - name: ClientApp
        value: {{ .Values.env.network_a }}

// how to define network_b on this deployment template
        

values.yaml

  env:

network_a: https://network-a.co.uk
network_b: https://network-b.co.uk
    

Since we can not call the same variables name in the deployment.yaml, how would I put the network_b to use the values from the deployment using the same name ClientApp.

0 Answers
Related