From 0fad20ea266fc9086e606216847fa5b78700352d Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Mon, 19 Jul 2021 13:09:37 +0200 Subject: [PATCH] Do not include ws port in service if is 8545 --- packages/helm-charts/testnet/templates/_helpers.tpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/helm-charts/testnet/templates/_helpers.tpl b/packages/helm-charts/testnet/templates/_helpers.tpl index de07b0a0aa7..3ba3f98a550 100644 --- a/packages/helm-charts/testnet/templates/_helpers.tpl +++ b/packages/helm-charts/testnet/templates/_helpers.tpl @@ -57,8 +57,11 @@ spec: ports: - port: 8545 name: rpc - - port: {{ .ws_port | default .Values.geth.ws_port }} +{{- $wsPort := ((.ws_port | default .Values.geth.ws_port) | int) -}} +{{- if ne $wsPort 8545 }} + - port: {{ $wsPort }} name: ws +{{- end }} selector: {{- if .proxy | default false }} {{- $validatorProxied := printf "%s-validators-%d" .Release.Namespace .validator_index }} @@ -82,8 +85,10 @@ spec: ports: - port: 8545 name: rpc +{{- if ne $wsPort 8545 }} - port: {{ .ws_port | default .Values.geth.ws_port }} name: ws +{{- end }} selector: {{- if .proxy | default false }} {{- $validatorProxied := printf "%s-validators-%d" .Release.Namespace .validator_index }}