diff --git a/charts/linkerd2/templates/_config.tpl b/charts/linkerd2/templates/_config.tpl index ea41d359b..fe365fb4b 100644 --- a/charts/linkerd2/templates/_config.tpl +++ b/charts/linkerd2/templates/_config.tpl @@ -30,10 +30,10 @@ "port": {{.Values.global.proxy.ports.control}} }, "ignoreInboundPorts":[ - {{- include "partials.splitStringListToPorts" .Values.global.proxyInit.ignoreInboundPorts -}} + {{- include "partials.splitStringListToPortRanges" .Values.global.proxyInit.ignoreInboundPorts -}} ], "ignoreOutboundPorts":[ - {{- include "partials.splitStringListToPorts" .Values.global.proxyInit.ignoreOutboundPorts -}} + {{- include "partials.splitStringListToPortRanges" .Values.global.proxyInit.ignoreOutboundPorts -}} ], "inboundPort":{ "port": {{.Values.global.proxy.ports.inbound}} diff --git a/charts/partials/templates/_helpers.tpl b/charts/partials/templates/_helpers.tpl index 6eec943f9..928da6609 100644 --- a/charts/partials/templates/_helpers.tpl +++ b/charts/partials/templates/_helpers.tpl @@ -46,16 +46,16 @@ For example "11,22,55,44" will become "11","22","55","44" {{- end -}} {{/* -Splits a coma separated list into a list of port objects. -For example "11,22,55" will become{"port":11},{"port":22}, -{"port":55} +Splits a coma separated list into a list of PortRange objects. +For example "11,22,55" will become{"portRange":11},{"portRange":22}, +{"portRange":55} */}} -{{- define "partials.splitStringListToPorts" -}} +{{- define "partials.splitStringListToPortRanges" -}} {{- if gt (len .) 0 -}} {{- $ports := splitList "," . -}} {{- $last := sub (len $ports) 1 -}} {{- range $i,$port := $ports -}} -{"port":{{$port}}}{{ternary "," "" (ne $i $last)}} +{"portRange":"{{$port}}"}{{ternary "," "" (ne $i $last)}} {{- end -}} {{- end -}} {{- end -}} diff --git a/cli/cmd/testdata/install_helm_output.golden b/cli/cmd/testdata/install_helm_output.golden index 953b2a6c4..150affdd7 100644 --- a/cli/cmd/testdata/install_helm_output.golden +++ b/cli/cmd/testdata/install_helm_output.golden @@ -902,8 +902,8 @@ data: "controlPort":{ "port": 4190 }, - "ignoreInboundPorts":[{"port":222}], - "ignoreOutboundPorts":[{"port":111}], + "ignoreInboundPorts":[{"portRange":"222"}], + "ignoreOutboundPorts":[{"portRange":"111"}], "inboundPort":{ "port": 4143 }, diff --git a/cli/cmd/testdata/install_helm_output_addons.golden b/cli/cmd/testdata/install_helm_output_addons.golden index a8253d435..a0ffddf71 100644 --- a/cli/cmd/testdata/install_helm_output_addons.golden +++ b/cli/cmd/testdata/install_helm_output_addons.golden @@ -902,8 +902,8 @@ data: "controlPort":{ "port": 4190 }, - "ignoreInboundPorts":[{"port":222}], - "ignoreOutboundPorts":[{"port":111}], + "ignoreInboundPorts":[{"portRange":"222"}], + "ignoreOutboundPorts":[{"portRange":"111"}], "inboundPort":{ "port": 4143 }, diff --git a/cli/cmd/testdata/install_helm_output_ha.golden b/cli/cmd/testdata/install_helm_output_ha.golden index 8afbbbbc6..77a47c933 100644 --- a/cli/cmd/testdata/install_helm_output_ha.golden +++ b/cli/cmd/testdata/install_helm_output_ha.golden @@ -902,8 +902,8 @@ data: "controlPort":{ "port": 4190 }, - "ignoreInboundPorts":[{"port":222}], - "ignoreOutboundPorts":[{"port":111}], + "ignoreInboundPorts":[{"portRange":"222"}], + "ignoreOutboundPorts":[{"portRange":"111"}], "inboundPort":{ "port": 4143 },