Skip to content

Commit 718afdf

Browse files
committed
docs(engine/helm): correct cidrContains docstring on operator-typo path
Previous wording claimed an operator-typoed floatingIP would fall through cidrContains to the default-route fallback link "rather than failing the render". That stopped being true once the chart layer added ipIsValid fail-fast for floatingIP — a typo now aborts the render at template time with a clear hint, never reaching cidrContains. Rewrite the paragraph so a reader looking at cidrContains understands the actual flow: lenient on COSI iteration (a corrupt entry mustn't crash the render) but the operator's floatingIP is validated up-front by ipIsValid, so a typo is caught before cidrContains is invoked. Signed-off-by: Aleksei Sviridkin <f@lex.la>
1 parent 1f557f8 commit 718afdf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/engine/helm/engine.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,10 @@ func ipIsValid(addrStr string) (string, error) {
333333
// undefined IP is not in any defined set. The chart-side helper that drives
334334
// the membership search runs over every entry in the addresses COSI
335335
// resource, so a single corrupt or future-format entry must not crash the
336-
// entire render. An operator-typoed floatingIP likewise falls through to the
337-
// default-route fallback link rather than failing the render — Talos itself
338-
// rejects malformed IP literals with a clear error on apply, so the chart
339-
// layer does not need to duplicate that check.
336+
// entire render. The operator-typoed floatingIP case is handled separately
337+
// by the chart layer: cozystack and generic call ipIsValid up-front and
338+
// fail the render with a clear hint that names the bad value, so a typoed
339+
// floatingIP never reaches cidrContains.
340340
func cidrContains(cidr, addrStr string) (bool, error) {
341341
prefix, err := netip.ParsePrefix(cidr)
342342
if err != nil {

0 commit comments

Comments
 (0)