Add two new helper functions to pkg/action/sequencing.go:
- warnIfPartialReadinessAnnotations: emits slog.Warn when a resource has
only one of readiness-success/readiness-failure (both required)
- warnIfIsolatedGroups: emits slog.Warn when multiple groups exist but
some have no connections to other groups (possible misconfiguration)
Both functions are called from deployResourceGroupBatches. The existing
slog.Warn for non-existent group references (from ParseResourceGroups)
was already present.
slog.Warn("resource has only one readiness annotation; both helm.sh/readiness-success and helm.sh/readiness-failure must be present for custom readiness evaluation; falling back to kstatus",
"resource",m.Head.Metadata.Name,
)
}
}
}
// warnIfIsolatedGroups emits a slog.Warn for each resource-group that has no
// connections to other groups (no depends-on edges and not depended on by any
// other group). Isolated groups are valid but may indicate a misconfiguration
return// A single group is not isolated in a meaningful sense
}
forgroupName:=rangeresult.Groups{
deps:=result.GroupDeps[groupName]
isDependedOn:=false
for_,otherDeps:=rangeresult.GroupDeps{
for_,d:=rangeotherDeps{
ifd==groupName{
isDependedOn=true
break
}
}
ifisDependedOn{
break
}
}
iflen(deps)==0&&!isDependedOn{
slog.Warn("resource-group is isolated with no connections to other groups; if sequencing is intended, add helm.sh/depends-on/resource-groups annotation to related groups",
"group",groupName,
)
}
}
}
// deployResourceGroupBatches deploys manifests for a single chart level using
// resource-group annotation DAG ordering. Resources without group annotations
// (or with invalid ones) are deployed last.
@ -172,6 +222,9 @@ func (s *sequencedDeployment) deployResourceGroupBatches(ctx context.Context, ma
returnnil
}
// Emit warnings for misconfigured annotations before deploying.