-
Notifications
You must be signed in to change notification settings - Fork 198
Description
Describe the bug
After a failed HelmRelease upgrade due to a schema mismatch, reverting the release to its previous version does not clear the Ready: False condition.
At a high level, the issue occurs as follows:
- A HelmRelease with specific values deploys the application testapp v0.1.0 successfully.
- The HelmRelease is updated with a new application version (v0.2.0) and some new values.
Due to a user error, the new values do not satisfy the JSON schema of the testapp v0.2.0. - Helm upgrade fails (values schema mismatch), the HelmRelease goes into failed state.
- A user wants to fix the situation and reverts all changes in the HelmRelease (version is back to 0.1.0 and extra values are removed)
- HelmRelease remains in a failed state, even though the actual Helm release is healthy on the cluster.
Steps to reproduce
Provided (attached) assets:
step2-helmrelease.yaml
step1-helmrelease.yaml
- HelmRlease for step 1 (step1-helmrelease.yaml)
- HelmRlease for the upgrade, step 2 (step2-helmrelease.yaml)
Step 1: Initial Install (Success)
Deploy Helm Chart Version and correct values: kubectl apply -f step1-helmrelease.yaml
Flux HelmRelease Status: Ready: True, Released: True
status:
conditions:
- lastTransitionTime: "2025-11-10T17:01:38Z"
message: Helm install succeeded for release default/testapp.v1 with chart [email protected]
observedGeneration: 1
reason: InstallSucceeded
status: "True"
type: Ready- lastTransitionTime: "2025-11-10T17:01:38Z"
message: Helm install succeeded for release default/testapp.v1 with chart [email protected]
observedGeneration: 1
reason: InstallSucceeded
status: "True"
type: Released
helmChart: flux-system/default-testapp
history:- appVersion: 1.16.0
chartName: testapp
chartVersion: 0.1.0
configDigest: sha256:754483bbdd57e25af5077f5385beec9ed0710d637c4eb6dd5b45bfa896f688e0
digest: sha256:2307ff024f7f5395bb79abb241c652015b3694d02205f8d34e7c287946836dc9
firstDeployed: "2025-11-10T17:01:36Z"
lastDeployed: "2025-11-10T17:01:36Z"
name: testapp
namespace: default
status: deployed
version: 1
lastAttemptedConfigDigest: sha256:754483bbdd57e25af5077f5385beec9ed0710d637c4eb6dd5b45bfa896f688e0
lastAttemptedGeneration: 1
lastAttemptedReleaseAction: install
lastAttemptedRevision: 0.1.0
observedGeneration: 1
storageNamespace: default
Step 2: Failed Upgrade (Unexpected Failure)
Apply changes to the HelmRelease (new version and one unexpected value): kubectl apply -f step2-helmrelease.yaml
Error: "Additional property somethingElse is not allowed"
HelmRelease Status: Ready: False, Released: False and message contain error details
status:
conditions:
- lastTransitionTime: "2025-11-10T17:03:21Z"
message: Running 'upgrade' action with timeout of 5m0s
observedGeneration: 2
reason: Progressing
status: "True"
type: Reconciling- lastTransitionTime: "2025-11-10T17:03:21Z"
message: |-
Helm upgrade failed for release default/testapp with chart [email protected]: values don't meet the specifications of the schema(s) in the following chart(s):
testapp:
- hooks: Additional property somethingElse is not allowed
observedGeneration: 2
reason: UpgradeFailed
status: "False"
type: Ready- lastTransitionTime: "2025-11-10T17:03:11Z"
message: |-
Helm upgrade failed for release default/testapp with chart [email protected]: values don't meet the specifications of the schema(s) in the following chart(s):
testapp:
- hooks: Additional property somethingElse is not allowed
observedGeneration: 2
reason: UpgradeFailed
status: "False"
type: Released
failures: 5
helmChart: flux-system/default-testapp
history:- appVersion: 1.16.0
chartName: testapp
chartVersion: 0.1.0
configDigest: sha256:754483bbdd57e25af5077f5385beec9ed0710d637c4eb6dd5b45bfa896f688e0
digest: sha256:2307ff024f7f5395bb79abb241c652015b3694d02205f8d34e7c287946836dc9
firstDeployed: "2025-11-10T17:01:36Z"
lastDeployed: "2025-11-10T17:01:36Z"
name: testapp
namespace: default
status: deployed
version: 1
lastAttemptedConfigDigest: sha256:3341a3daff2e5af7b14a5b3c37f134daa31378cf9619c52d69499928b2b18ca6
lastAttemptedGeneration: 2
lastAttemptedReleaseAction: upgrade
lastAttemptedRevision: 0.2.0
observedGeneration: 1
storageNamespace: default
Step 3: Revert to Previous Config (a user wants to fix the situation)
Apply original version of the HelmRelease: kubectl apply -f step1-helmrelease.yaml
Flux HelmRelease Status: Ready: False with stale error message.
Such an erroneous status remains forever.
status:
conditions:
- lastTransitionTime: "2025-11-10T17:03:49Z"
message: |-
Helm upgrade failed for release default/testapp with chart [email protected]: values don't meet the specifications of the schema(s) in the following chart(s):
testapp:
- hooks: Additional property somethingElse is not allowed
observedGeneration: 3
reason: UpgradeFailed
status: "False"
type: Ready- lastTransitionTime: "2025-11-10T17:03:11Z"
message: |-
Helm upgrade failed for release default/testapp with chart [email protected]: values don't meet the specifications of the schema(s) in the following chart(s):
testapp:
- hooks: Additional property somethingElse is not allowed
observedGeneration: 2
reason: UpgradeFailed
status: "False"
type: Released
helmChart: flux-system/default-testapp
history:- appVersion: 1.16.0
chartName: testapp
chartVersion: 0.1.0
configDigest: sha256:754483bbdd57e25af5077f5385beec9ed0710d637c4eb6dd5b45bfa896f688e0
digest: sha256:2307ff024f7f5395bb79abb241c652015b3694d02205f8d34e7c287946836dc9
firstDeployed: "2025-11-10T17:01:36Z"
lastDeployed: "2025-11-10T17:01:36Z"
name: testapp
namespace: default
status: deployed
version: 1
lastAttemptedConfigDigest: sha256:754483bbdd57e25af5077f5385beec9ed0710d637c4eb6dd5b45bfa896f688e0
lastAttemptedGeneration: 3
lastAttemptedReleaseAction: upgrade
lastAttemptedRevision: 0.1.0
observedGeneration: 3
storageNamespace: default
Expected behavior
After reverting changes in the HelmRelease, its status should reflect the actual healthy status of a helm release.
Flux version
v2.7.2
helm-controller v1.4.2