Skip to content

Commit 19d5bfb

Browse files
authored
chore: Improving secret handling for BN chart deployments (#1289)
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
1 parent 5f39dda commit 19d5bfb

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

charts/block-node-server/templates/deployment.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,13 @@ spec:
8383
envFrom:
8484
- configMapRef:
8585
name: {{ include "hiero-block-node.fullname" . }}-config
86+
{{ if .Values.blockNode.secret }}
8687
- secretRef:
87-
name: {{ include "hiero-block-node.fullname" . }}-secret
88+
name: {{ include "hiero-block-node.fullname" . }}-secret
89+
{{ else if .Values.blockNode.secretRef }}
90+
- secretRef:
91+
name: {{ .Values.blockNode.secretRef }}
92+
{{ end }}
8893
volumeMounts:
8994
- name: logging-config
9095
mountPath: {{ .Values.blockNode.logs.configMountPath }}

charts/block-node-server/templates/secret.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.blockNode.secret }}
12
{{- /*
23
SPDX-License-Identifier: Apache-2.0
34
*/}}
@@ -11,3 +12,4 @@ data:
1112
{{- range $key, $value := .Values.blockNode.secret }}
1213
{{ $key }}: {{ $value | b64enc }}
1314
{{- end }}
15+
{{- end}}

charts/block-node-server/values.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,11 @@ blockNode:
124124
# this does not create a PVC.
125125
# should match PERSISTENCE_STORAGE_UNVERIFIED_ROOT_PATH, leave as is for default.
126126
mountPath: "/opt/hiero/block-node/data/unverified"
127-
secret:
128-
PRIVATE_KEY: "fake_private_key"
127+
# For secrets, is recommended to use a secretRef to an existing secret on the cluster.
128+
# secretRef: secret-name-reference
129+
# not recommended to use this, but for testing purposes you can use the following collection for secrets auto-creation
130+
# secret:
131+
# EXAMPLE_SECRET: "FAKE EXAMPLE VALUE SECRET"
129132
health:
130133
readiness:
131134
endpoint: "/healthz/readyz"

0 commit comments

Comments
 (0)