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.
When --wait=ordered is used with helm template, output manifests in
resource-group DAG order with START/END delimiters per HIP-0025 spec.
Unsequenced resources are output last without delimiters.
Adds SequencingInfo struct to Release for storing whether --wait=ordered was
used. Install and upgrade with OrderedWaitStrategy now persist SequencingInfo.
Rollback propagates it from the target revision and uses deployChartLevel when
the target was originally sequenced. Uninstall deletes in reverse resource-group
DAG order (dependents deleted before dependencies) when SequencingInfo.Enabled.
Adds performSequencedUpgrade to upgrade.go that reuses sequencedDeployment
(from sequencing.go) to apply resources in topological DAG order when
--wait=ordered is used. Each batch calls KubeClient.Update() with matching
old resources, then waits for readiness before the next batch.
Also fixes createAndWait to call setMetadataVisitor so Helm ownership
labels/annotations are set on sequenced resources (both install and upgrade).
Adds pkg/action/sequencing.go with GroupManifestsByDirectSubchart and
sequencedDeployment, which deploys chart resources in subchart and
resource-group topological batches. Extends action.go to expose sorted
manifests from the render pipeline via renderResourcesWithFiles. Wires
up performSequencedInstall in install.go when --wait=ordered is used.
Adds OrderedWaitStrategy ("ordered") to the WaitStrategy enum in pkg/kube.
Updates --wait flag to accept "ordered" and flags.go validation.
Adds --readiness-timeout flag (default 1m) to install and upgrade commands.
Adds ReadinessTimeout field to Install and Upgrade action structs.
Validates ReadinessTimeout must not exceed Timeout at run time.
Adds EvaluateCustomReadiness to pkg/kube for helm.sh/readiness-success
and helm.sh/readiness-failure annotation evaluation. Supports ==, !=,
<, <=, >, >= operators against string, numeric, and boolean field values
using {.fieldPath} JSONPath syntax scoped to .status.
* feat(create): add hidden --chart-api-version flag
Add --chart-api-version flag to helm create command to allow selecting
chart API version (v2 or v3) when creating a new chart.
- Default is v2 (existing behavior unchanged)
- v3 uses internal/chart/v3 scaffold generator
- Invalid versions return clear error message
- Works with --starter flag
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Add HELM_EXPERIMENTAL_CHART_V3 feature gate to create command
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* make chartv3 private and use loader to load the chart
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Hide chart-api-version flag until chart v3 is officially released
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Conditionally hide the --chart-api-version flag if chart v3 is not enabled
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Add internal gates package for internal feature gates
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Add doc for internal/gates package
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
---------
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
When copying slices containing nil interface{} elements, the copyValue
function would panic with 'reflect: call of reflect.Value.Set on zero
Value'. This occurred because reflect.ValueOf(nil) returns a zero Value
that cannot be set.
This issue was introduced in v4.1.0 when replacing mitchellh/copystructure
with an internal implementation. The fix mirrors the existing nil handling
logic used for map values.
Fixes helm template panic when processing charts with YAML like:
extraArgs:
-
Added test case to verify slice elements with nil values are properly
handled during deep copy operations.
Signed-off-by: Philipp Born <git@pborn.eu>