Graylog helm with alb ingress controller

5/21/2020

I am trying to deploy graylog via helm and leverage alb ingress controller. I am unable to use --set graylog.ingress.extraPaths=. I just want to enable the ssl redirect.

helm install --namespace "graylog" -n "graylog" stable/graylog \
  --set graylog.replicas=1 \
  --set graylog.service.type=NodePort \
  --set graylog.ingress.enabled=true  \
  --set graylog.ingress.hosts.0=XXX \
  --set graylog.ingress.path="/*" \
  --set graylog.ingress.extraPaths="[{"backend":{"serviceName":"ssl-redirect","servicePort":"use-annotation"},"path":"/*"}]" \
  --set graylog.ingress.annotations."kubernetes\.io/ingress\.class"=alb \
...

I have tried escaping the json as well and can not get it to work. It will either say Error: failed parsing --set data: key "servicePort:use-annotation}" has no value (cannot end with ,), say the chart name is missing, or Error: YAML parse error on graylog/templates/ingress.yaml: error converting YAML to JSON: yaml: line 38: did not find expected key.

Has anyone set this value via the set flag that can help me out? The actual yml would end up looking like this:

          - path: /*
            backend:
              serviceName: ssl-redirect
              servicePort: use-annotation
-- roosterrocket
graylog
kubernetes-helm

1 Answer

5/21/2020

Figured it out:

  --set graylog.ingress.extraPaths[0].backend.serviceName=ssl-redirect \
  --set graylog.ingress.extraPaths[0].backend.servicePort=use-annotation \
  --set graylog.ingress.extraPaths[0].path="/*" \
-- roosterrocket
Source: StackOverflow