helmfile: Unable to set value for annotation variable

It seem like there is a problem when I want to add variable using set and the value of this variable is supposed to be key: value pair like annotations when it comes to nginx-ingress controller using AWS.

context: example.com                # kube-context (--kube-context)

releases:
  # Published chart example
  - name: controller-pod-nginx                  # name of this release
    namespace: ingress-nginx                    # target namespace
    chart: stable/nginx-ingress                 # the chart being installed to create this release, referenced by `repository/chart` syntax
    set:                                        # values (--set)
      - name: rbac.create
        value: true
      - name: controller.service.annotations
        value: 'service.beta.kubernetes.io/aws-load-balancer-ssl-ports:https'

error message:

 helmfile -f deploy_cp_ns_ingress-nginx.yaml sync
exec: helm repo add roboll http://roboll.io/charts --kube-context example.com
"roboll" has been added to your repositories
exec: helm repo update --kube-context example.com
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "roboll" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. āŽˆ Happy Helming!āŽˆ
exec: helm upgrade --install controller-pod-nginx stable/nginx-ingress --namespace ingress-nginx --set rbac.create=true,controller.service.annotations=service.beta.kubernetes.io/aws-load-balancer-ssl-ports:https --kube-context example.com
Error: UPGRADE FAILED: YAML parse error on nginx-ingress/templates/controller-service.yaml: error unmarshaling JSON: json: cannot unmarshal string into Go struct field .annotations of type map[string]string
err: exit status 1

If I use a pure helm installation that works with no problem:

helm install stable/nginx-ingress --set rbac.create=true --set controller.service.annotations."service\.beta\.kubernetes\.io/aws-load-balancer-backend-protocol"=http --namespace=ingress-nginx

That works with no problem. I will need to add numerous annotations.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Perhaps things get much easier if we implemented https://github.com/roboll/helmfile/issues/119#issuecomment-384830608?

@xjantoth I’d appreciate your comment on it!