Skip to content

Commit 37923c6

Browse files
authored
helpers shard logic
1 parent e69db76 commit 37923c6

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

charts/horcrux/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: horcrux
33
description: A production-grade Helm chart for deploying Horcrux remote signer for Cosmos chains
44
type: application
5-
version: 1.0.7
5+
version: 1.0.8
66
appVersion: "v3.3.2"
77
keywords:
88
- cosmos

charts/horcrux/templates/_helpers.tpl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,18 @@ Generate cosigner configuration
116116
{{- $fullname := include "horcrux.fullname" . -}}
117117
{{- $serviceName := include "horcrux.serviceName" . -}}
118118
{{- $namespace := include "horcrux.namespace" . -}}
119+
{{- if and (eq .Values.shards.method "externalSecret") .Values.shards.externalSecrets.enabled }}
120+
{{- range $i, $shardConfig := .Values.shards.externalSecrets.shardConfigs }}
121+
- shardID: {{ int $shardConfig.shardId }}
122+
p2pAddr: tcp://{{ $fullname }}-{{ $i }}.{{ $serviceName }}.{{ $namespace }}.svc.cluster.local:{{ $.Values.service.headless.p2pPort }}
123+
{{- end }}
124+
{{- else }}
119125
{{- range $i := until (int .Values.replicaCount) }}
120126
- shardID: {{ add $i 1 }}
121127
p2pAddr: tcp://{{ $fullname }}-{{ $i }}.{{ $serviceName }}.{{ $namespace }}.svc.cluster.local:{{ $.Values.service.headless.p2pPort }}
122128
{{- end }}
123129
{{- end }}
130+
{{- end }}
124131

125132
{{/*
126133
Generate shard secret name
@@ -195,5 +202,4 @@ checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sh
195202
{{- with .Values.podAnnotations }}
196203
{{ toYaml . }}
197204
{{- end }}
198-
{{- end }}
199-
205+
{{- end }}

0 commit comments

Comments
 (0)