(bug) Enhance Helm Dependency Resolution and Metadata Validation#1641
Merged
gianlucam76 merged 1 commit intoprojectsveltos:mainfrom Mar 10, 2026
Merged
(bug) Enhance Helm Dependency Resolution and Metadata Validation#1641gianlucam76 merged 1 commit intoprojectsveltos:mainfrom
gianlucam76 merged 1 commit intoprojectsveltos:mainfrom
Conversation
Member
Author
|
Started with apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
labels:
test-deployment: "true"
name: prometheus-27-1-0
namespace: default
spec:
interval: 0s
ref:
tag: kube-prometheus-stack-27.1.0
timeout: 1m0s
url: https://github.com/prometheus-community/helm-charts.git
---
apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: test-profile
spec:
clusterRefs:
- apiVersion: lib.projectsveltos.io/v1beta1
kind: SveltosCluster
name: mgmt
namespace: mgmt
clusterSelector: {}
continueOnConflict: false
continueOnError: true
helmCharts:
- helmChartAction: Install
releaseName: test-prometheus
releaseNamespace: monitoring
repositoryURL: GitRepository://default/prometheus-27-1-0/charts/prometheus
values: |
server:
replicaCount: one
reloader: false
stopMatchingBehavior: WithdrawPolicies
syncMode: Continuousbecause of incorrect values ClusterSummary goes to failed state status:
dependencies: no dependencies
featureSummaries:
- consecutiveFailures: 2
failureMessage: |
chart: , release: test-prometheus, failed to create resource: Deployment in version "v1" cannot be handled as a Deployment: json: cannot unmarshal string into Go struct field DeploymentSpec.spec.replicas of type int32
featureID: Helm
hash: L9feSuJgfU70RytYjSMeG5q1g8yYidQ6ArmW7ilaTF4=
lastAppliedTime: "2026-03-10T18:29:12Z"
status: Failed
helmReleaseSummaries:
- releaseName: test-prometheus
releaseNamespace: monitoring
status: Managingfix the values values: "server:\n replicaCount: 1 \n"ClusterSummary gets provisioned status:
dependencies: no dependencies
featureSummaries:
- featureID: Helm
hash: fd+1+Z4b5s1U4XaJQllKSOPg5Nin6eOXlz7B2If/tn8=
lastAppliedTime: "2026-03-10T18:30:11Z"
status: Provisioned |
This PR addresses issues where Helm releases would fail or get stuck due to missing sub-charts or invalid semantic versioning metadata during the upgrade lifecycle. It introduces a more robust dependency management flow and sanitizes chart metadata to prevent "invalid semantic version" errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses issues where Helm releases would fail or get stuck due to missing sub-charts or invalid semantic versioning metadata during the upgrade lifecycle. It introduces a more robust dependency management flow and sanitizes chart metadata to prevent "invalid semantic version" errors.
Fixes #1631