Skip to content

Commit

Permalink
try re-adding rpcEndpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
matilote committed Sep 14, 2023
1 parent 9189115 commit fe42ed7
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions charts/validators/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,21 @@
{{- $root := . -}}
{{- $counter := 0 }}
{{- range (untilStep (int .Values.validatorsKeyIndex) (int (add .Values.validatorsKeyIndex .Values.validatorsCount)) 1) }}
{{ $counter = int (add1 $counter) }}

{{ $rpcEndpoints := list }}
{{- if $.Values.beaconChainRpcEndpointsRandomized }}
{{- $rpcList := list }}
{{- range (untilStep $counter (len $.Values.beaconChainRpcEndpointsRandomized) 1) }}
{{ $rpcList = append $rpcList (index $.Values.beaconChainRpcEndpointsRandomized .) }}
{{- end }}
{{ $rpcList = append $rpcList $.Values.beaconChainRpcEndpointsRandomized }}
{{ $rpcEndpoints = include "flatten" $rpcList }}
{{- if ge $counter (len $.Values.beaconChainRpcEndpointsRandomized) }}
{{- $counter = 1 }}
{{- else }}
{{ $counter = int (add1 $counter) }}
{{- end }}
{{- end }}

---
apiVersion: apps/v1
Expand Down Expand Up @@ -94,7 +108,7 @@ spec:
env:
{{- if $.Values.beaconChainRpcEndpointsRandomized }}
- name: BEACON_CHAIN_RPC_ENDPOINTS_RANDOMIZED
value: "{{ $.Values.beaconChainRpcEndpointsRandomized | join "," }}"
value: "{{ $rpcEndpoints }}"
{{- end }}
{{- if $.Values.beaconChainRpcEndpoints }}
- name: BEACON_CHAIN_RPC_ENDPOINTS
Expand Down

0 comments on commit fe42ed7

Please sign in to comment.