我正试图通过舵机和alb入口控制器来部署graylog。我无法使用 --set graylog.ingress.extraPaths=
. 我只是想启用ssl重定向。
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 \
...
我也试过对json进行转义处理,但无法正常工作,要么说Error: failed parsing --set data: key "servicePort:use-annotation}" has no value (不能以 , 结尾),要么说Error: failed parsing --set data: key "servicePort:use-annotation}"。它要么说Error: failed parsing --set data: key "servicePort:use-annotation}" has no value (can not end with ,), say the chart name is missing, or Error: YAML parse error on graylogtemplatesingress.yaml: error converting YAML to JSON: yaml: line 38: did not find expected key.
有谁通过set标志设置了这个值,可以帮我解决?实际的yml最终会是这样的。
- path: /*
backend:
serviceName: ssl-redirect
servicePort: use-annotation
解决了。
--set graylog.ingress.extraPaths[0].backend.serviceName=ssl-redirect \
--set graylog.ingress.extraPaths[0].backend.servicePort=use-annotation \
--set graylog.ingress.extraPaths[0].path="/*" \