You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{- if and .Values.config.listen (not (hasSuffix $p2pExpect .Values.config.listen)) }}
114
+
{{- fail (printf "config.listen %q must end with %q to match service.p2p.port; use service.p2p.port to change the port and set config.listen only to override the bind address." .Values.config.listen $p2pExpect) }}
{{- if and .Values.config.rpclisten (not (hasSuffix $rpcExpect .Values.config.rpclisten)) }}
119
+
{{- fail (printf "config.rpclisten %q must end with %q to match rpcService.port; use rpcService.port to change the port and set config.rpclisten only to override the bind address." .Values.config.rpclisten $rpcExpect) }}
{{- if and .Values.metrics.listen (not (hasSuffix $metricsExpect .Values.metrics.listen)) }}
125
+
{{- fail (printf "metrics.listen %q must end with %q to match metrics.service.port; use metrics.service.port to change the port and set metrics.listen only to override the bind address." .Values.metrics.listen $metricsExpect) }}
{{- if and .Values.stratum.listen (not (hasSuffix $stratumExpect .Values.stratum.listen)) }}
131
+
{{- fail (printf "stratum.listen %q must end with %q to match stratum.service.port; use stratum.service.port to change the port and set stratum.listen only to override the bind address." .Values.stratum.listen $stratumExpect) }}
132
+
{{- end }}
133
+
{{- end }}
72
134
{{- if or $networkNeedsArg .Values.metrics.enabled .Values.stratum.enabled }}
{{- /* handshake-node v0.2.0-rc1 refuses to start when --stratumlisten
151
+
is set without --miningaddr, regardless of allowPublic. Require
152
+
stratum.miningAddress whenever Stratum is enabled and always
153
+
emit --miningaddr. Auth credentials remain required only for
154
+
public exposure. */ -}}
155
+
{{- $miningAddr := required "stratum.miningAddress is required when stratum.enabled=true (handshake-node rejects --stratumlisten without --miningaddr)." .Values.stratum.miningAddress }}
92
156
- --stratumlisten={{ $stratumListen }}
157
+
- --miningaddr={{ $miningAddr }}
93
158
{{- if .Values.stratum.allowPublic }}
94
-
{{- $miningAddr := required "stratum.miningAddress is required when stratum.enabled=true and stratum.allowPublic=true" .Values.stratum.miningAddress }}
95
159
{{- $_ := required "stratum.auth.existingSecret is required when stratum.enabled=true and stratum.allowPublic=true" .Values.stratum.auth.existingSecret }}
96
160
- --stratumallowpublic
97
-
- --miningaddr={{ $miningAddr }}
98
-
{{- else }}
99
-
{{- with .Values.stratum.miningAddress }}
100
-
- --miningaddr={{ . }}
101
-
{{- end }}
102
161
{{- end }}
103
162
{{- end }}
104
163
{{- end }}
@@ -141,12 +200,36 @@ spec:
141
200
name: {{ .Values.stratum.auth.existingSecret }}
142
201
key: {{ .Values.stratum.auth.passwordKey }}
143
202
{{- end }}
203
+
{{- /* Reserve chart-managed env names from user-supplied override
204
+
mechanisms. Duplicates in the env list cause kubelet to warn
205
+
and the later definition wins, which lets config.extra or
206
+
extraEnv silently shadow validated listener values or
207
+
Secret-sourced credentials. Failing render here keeps the
{{- fail (printf "config.extra key %q renders env %q which is reserved by the chart. Use the corresponding chart value (service.p2p.port / rpcService.port / config.listen / config.rpclisten / config.rpcallowip / rpc.existingSecret / stratum.auth.existingSecret) instead." $k $rendered) }}
223
+
{{- end }}
224
+
- name: {{ $rendered }}
147
225
value: {{ $v | quote }}
148
226
{{- end }}
149
227
{{- end }}
228
+
{{- range .Values.extraEnv }}
229
+
{{- if has .name $reserved }}
230
+
{{- fail (printf "extraEnv name %q is reserved by the chart. Use the corresponding chart value (service.p2p.port / rpcService.port / config.listen / config.rpclisten / config.rpcallowip / rpc.existingSecret / stratum.auth.existingSecret) instead." .name) }}
0 commit comments