Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions controllers/handlers_helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,12 @@ func uninstallHelmCharts(ctx context.Context, c client.Client, clusterSummary *c
}

releaseReports := make([]configv1beta1.ReleaseReport, 0)
for i := range clusterSummary.Spec.ClusterProfileSpec.HelmCharts {
currentChart := &clusterSummary.Spec.ClusterProfileSpec.HelmCharts[i]
// Uninstall in the reverse of install order (handled by walkChartsAndDeploy): a chart
// installed later in the list may depend on one installed earlier (e.g. a controller on a
// CRD chart), so tearing the whole profile down should undo that dependency last.
helmCharts := clusterSummary.Spec.ClusterProfileSpec.HelmCharts
for i := len(helmCharts) - 1; i >= 0; i-- {
currentChart := &helmCharts[i]

instantiatedChart, err := getInstantiatedChartIdentity(ctx, dCtx, currentChart, logger)
if err != nil {
Expand Down
Loading