What happens
When updateChartMap (in prepareForDeployment, clustersummary_controller.go) fails while registering a ClusterSummary's Helm charts with the chart manager, the error is only logged by the manager — it never reaches ClusterSummary.Status. The ClusterSummary sits with no featureSummaries entry for Helm at all (or a stale one), retrying silently forever with no indication anything is wrong.
Where
clustersummary_controller.go, in prepareForDeployment:
err = r.updateChartMap(ctx, clusterSummaryScope, logger)
if err != nil {
if apierrors.IsNotFound(err) {
// A required (non-optional) templateResourceRef is missing. Surface it as a
// failure so the operator can see why deployment is blocked.
r.setFailureMessage(clusterSummaryScope, err.Error())
r.resetFeatureStatus(clusterSummaryScope, libsveltosv1beta1.FeatureStatusFailedNonRetriable)
}
r.setNextReconcileTime(clusterSummaryScope, normalRequeueAfter)
return reconcile.Result{RequeueAfter: normalRequeueAfter}
}
Only the apierrors.IsNotFound case (a missing non-optional TemplateResourceRef) surfaces a failure via setFailureMessage/resetFeatureStatus. Every other error from updateChartMap — e.g. a Helm chart field that fails Sveltos template instantiation — falls through to a silent requeue. The error line does exist in the addon-controller pod logs (clustersummary_controller.go "failed to get instantiated charts"), but nothing looks at kubectl logs when a ClusterProfile appears to just do nothing; the natural place to check is kubectl get clustersummary -o yaml, which shows nothing at all.
Repro
- Apply a ClusterProfile whose
helmCharts[].values isn't valid as a Sveltos template (e.g. contains {{ .Values.x }}, which .Values doesn't resolve to in the Sveltos template context).
kubectl get clustersummary <name> -o yaml — status shows only dependencies/nextReconcileTime, no featureSummaries, no failure message, indefinitely.
kubectl logs -n projectsveltos deployment/addon-controller shows the real error, repeating every reconcile.
Expected
Any error from updateChartMap should surface on ClusterSummary.Status (failure message + appropriate feature status), the same way the apierrors.IsNotFound case already does, so a broken ClusterProfile is visible from kubectl get clustersummary alone.
🤖 Generated with Claude Code
https://claude.ai/code/session_017ni1qBbWHY224NZhMDZdGR
What happens
When
updateChartMap(inprepareForDeployment,clustersummary_controller.go) fails while registering a ClusterSummary's Helm charts with the chart manager, the error is only logged by the manager — it never reachesClusterSummary.Status. The ClusterSummary sits with nofeatureSummariesentry for Helm at all (or a stale one), retrying silently forever with no indication anything is wrong.Where
clustersummary_controller.go, inprepareForDeployment:Only the
apierrors.IsNotFoundcase (a missing non-optionalTemplateResourceRef) surfaces a failure viasetFailureMessage/resetFeatureStatus. Every other error fromupdateChartMap— e.g. a Helm chart field that fails Sveltos template instantiation — falls through to a silent requeue. The error line does exist in the addon-controller pod logs (clustersummary_controller.go"failed to get instantiated charts"), but nothing looks atkubectl logswhen a ClusterProfile appears to just do nothing; the natural place to check iskubectl get clustersummary -o yaml, which shows nothing at all.Repro
helmCharts[].valuesisn't valid as a Sveltos template (e.g. contains{{ .Values.x }}, which.Valuesdoesn't resolve to in the Sveltos template context).kubectl get clustersummary <name> -o yaml—statusshows onlydependencies/nextReconcileTime, nofeatureSummaries, no failure message, indefinitely.kubectl logs -n projectsveltos deployment/addon-controllershows the real error, repeating every reconcile.Expected
Any error from
updateChartMapshould surface onClusterSummary.Status(failure message + appropriate feature status), the same way theapierrors.IsNotFoundcase already does, so a broken ClusterProfile is visible fromkubectl get clustersummaryalone.🤖 Generated with Claude Code
https://claude.ai/code/session_017ni1qBbWHY224NZhMDZdGR