apisix-helm-chart
apisix-helm-chart copied to clipboard
how to set the values of consul
in the apisix helm chart,there is no way to set the values of consul,just to use values.yaml,if i want to use helm install --set ,how to do it ? thanks
I think this is a how-to problem about helm, see https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing.
@tokers thanks,yes,its about helm,there is no way to set values use helm about --set: --in the chart the _helpers.tpl: {{- if .Values.discovery.enabled }} discovery: {{- range $key, $value := .Values.discovery.registry }} {{ $key }}: {{- include "apisix.tplvalues.render" (dict "value" $value "context" $) | nindent 8 }} {{- end }} {{- end }}
--the template of the deployement : {{/* Renders a value that contains template. Usage: {{ include "apisix.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} */}} {{- define "apisix.tplvalues.render" -}} {{- if typeIs "string" .value }} {{- tpl .value .context }} {{- else }} {{- tpl (.value | toYaml) .context }} {{- end }} {{- end -}}
--the values.yaml: values: discovery: enabled: true registry: consul_kv: servers: - http://10.0.1.1:8500 - http://10.0.1.1:8500 prefix: "myservice"
i found more articals,but can't find how to use --set