-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DependsOn readiness check should only rely on Ready condition #946
Comments
can you give more information on the issue? The code is good for me. We expected a dependency to be ready only if the current version have been successfully reconciled. |
The |
@seaneagan I don't see how helm-controller/internal/controller/helmrelease_controller.go Lines 180 to 182 in 5e760db
Can you please add a unit test to prove this can actually happen? Removing |
is it possible that an error which is not a TerminalError can happen while the Ready condition still gets set to True? What is the intention of when .status.observedGeneration should get updated? Would it make sense to simply always update it since in the most basic sense the generation has been observed? Or perhaps it can look at the conditions ObservedGenerations to determine whether it has been observed "enough" to ensure consistency vs looking at the transient result of the individual reconciliation? separately, would it be ok to consider my proposed change independently of the above, as it feels more correct to rely on the Ready condition ObservedGeneration as it is intimately tied to the Ready condition status which is also being checked for dependencies? |
trying to translate the intention of that if condition into status conditions, perhaps if Ready==true or Stalled==true at that generation, then that generation has been observed? |
ok, so it looks like i was hitting #925 which was still allowing the helm-controller/internal/reconcile/release.go Line 140 in 5e760db
|
this seems pretty nice, wonder if it can be integrated? |
I think we need a test for when drift correction is in loop that should used the kstatus verifier that catches any miss configuration https://github.com/fluxcd/kustomize-controller/blob/e9f5628eccbfbc722a7637ecbf7f66580e2e4416/internal/controller/kustomization_wait_test.go#L135 The checks and logic we use for the Ready/Stalled/Reconciling is here https://github.com/fluxcd/pkg/blob/60815565aaaa9bc92edc296a107288089764a384/runtime/conditions/check/fail.go |
I think this will fix it #885 |
@seaneagan with #885 merged I think this will solve your issue. Ready will reflect now that drift detection is running without reaching correction. |
It appears
.status.observedGeneration
does not reliably get updated after successful helm release upgrades. I can work on filing a separate bug for this, need to find time to come up with a minimal re-production, seems possible an issue could have been introduced in 48cad68However, when checking dependencies it seems preferable to rely solely on the
Ready
condition, including both itsStatus
andObservedGeneration
and ignore.Status.ObservedGeneration
. Which then in turn has the side effect of avoiding the above mentioned bug.helm-controller/internal/controller/helmrelease_controller.go
Line 588 in 5e760db
The text was updated successfully, but these errors were encountered: