Why I get some strange chars when I deploy with Helm via the command line?

10/22/2019

I am trying to deploy the nginx-ingress helm chart and I want to provide some extraArgs.

The thing is that, when I try to pass the arguments from the console

helm upgrade --install ${release_name} \
--set controller.extraArgs={udp-services-configmap=default/cm-udp-services} \
stable/nginx-ingress

I get this when I describe the deployment.

    Args:
      /nginx-ingress-controller
      --default-backend-service=default/tcp-udp-ic-nginx-ingress-default-backend
      --election-id=ingress-controller-leader
      --ingress-class=nginx
      --configmap=default/tcp-udp-ic-nginx-ingress-controller
      --0=udp-services-configmap:default/cm-udp-services

I just don't understand why I get this 0=.

However, when I add the extra argument via the values.yml file,

  ## Additional command line arguments to pass to nginx-ingress-controller
  ## E.g. to specify the default SSL certificate you can use
  ## extraArgs:
  ##   default-ssl-certificate: "<namespace>/<secret_name>"
  extraArgs: {
               udp-services-configmap=default/cm-udp-services
  }

everything is ok.

Has anyone else encounter this?

EDIT

Even though weibeld's answer solved the problem, I observe that when I deploy the IC, the service unfortunately does not have the ports that are stated in the config-map open.

-- Kostas Demiris
kubernetes
kubernetes-helm
nginx-ingress

1 Answer

10/22/2019

Remove the curly braces and delimit the udp-services-configmap argument with a period:

helm upgrade --install ${release_name} \
--set controller.extraArgs.udp-services-configmap=default/cm-udp-services \
stable/nginx-ingress

And if you use a values.yaml file, the usual way to write it is:

controller:
  extraArgs:
    udp-services-configmap: default/cm-udp-services

You don't need curly braces in YAML, except for denoting an empty object (extraArgs: {}).

-- weibeld
Source: StackOverflow