Skip to content

Commit 42967b7

Browse files
committed
fix(chart): use fail instead of required for unconditional discovery error
Address review feedback from gemini-code-assist on charts/cozystack/templates/_helpers.tpl:32: The empty-discovery branch used `required "msg" ""` to fail — the literal empty string as value makes the check unconditionally-true, which is semantically confusing since required() is for optional-vs- required checks. `fail "msg"` expresses the same intent in one function call and matches the engine's existing helpers (the render harness already registers both required and fail). No behavior change; same error message, same trigger condition. Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent d7e602e commit 42967b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎charts/cozystack/templates/_helpers.tpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ machine:
2929
otherwise produce duplicate list entries. */ -}}
3030
{{- $addrs := fromJsonArray (include "talm.discovered.default_addresses_by_gateway" .) }}
3131
{{- if not $addrs }}
32-
{{- required "values.yaml: `advertisedSubnets` was left empty and talm could not derive a default from discovery. No default-gateway-bearing link was found on the node. This field is a cluster-wide subnet selector fed to kubelet and etcd; `talm template` is invoked once per node and cannot merge per-node values into one cluster value. Either set advertisedSubnets explicitly in values.yaml, or ensure the node has a default route before running `talm template`." "" }}
32+
{{- fail "values.yaml: `advertisedSubnets` was left empty and talm could not derive a default from discovery. No default-gateway-bearing link was found on the node. This field is a cluster-wide subnet selector fed to kubelet and etcd; `talm template` is invoked once per node and cannot merge per-node values into one cluster value. Either set advertisedSubnets explicitly in values.yaml, or ensure the node has a default route before running `talm template`." }}
3333
{{- end }}
3434
{{- $subnets := list }}
3535
{{- range $addrs }}

0 commit comments

Comments
 (0)