-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Helm Release Recreated After HelmRelease Is Garbage Collected #1873
Comments
Can you share some details about your chart, I tried to reproduce it with the |
Sure, so here is an example of the HelmRelease:
The chart is stored in the same Flux config repo and isn't anything out of the ordinary. These |
I just noticed this in the logs:
I'm not sure what would've caused that or if it could be related to this issue. The release was not updated outside of Git for reference. |
It is possible to log the diff by configuring the |
I tried adding that flag, but I'm not seeing the diffs being logged for some reason. It should just be logged to stdout? |
Had a fruitful chat with @stevenpall on Slack. The problem is that we collect all resources in memory and loop over them to do a release for each one, in case you have a lot of releases (31 to be precise in this case), the release will still be scheduled after it has been removed. The quick fix would be to attempt to resolve the The better fix in my opinion would be to queue releases and dequeue a scheduled release when the |
I like the slightly more general form of this, which is to check that nothing has changed, just before attempting the release. That includes whether the HelmRelease has been removed, but also if it's been changed.
The operator.go has a queue of what has been added/updated/deleted (it calls |
I don't fully understand this. You mean that the release is scheduled by the helm operator? How come we are releasing a garbage-collecting in the iteration? Does it mean we attempt to release when nothing has changed? |
Because we request all known
No, we just look at each |
Ah, I see. Thanks for the clarification.
…On Thu, Apr 4, 2019, 15:27 Hidde Beydals ***@***.***> wrote:
How come we are releasing a garbage-collecting in the iteration?
Because we request all known HelmReleases and iterate over them
one-by-one.
https://github.com/weaveworks/flux/blob/19da0fc97dcf22e67a2a20f487ea1a9717f1b003/integrations/helm/chartsync/chartsync.go#L391-L398
Does it mean we attempt to release when nothing has changed?
No, we just look at each HelmRelease and do a dry-run release to see if
anything has changed and we need to do an actual release.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1873 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQOJPfDfWdHLjezlAYQee0MTnArNptJks5vdf2ngaJpZM4cOPmx>
.
|
I'm having a strange issue with the new
--sync-garbage-collection
feature. Basically, when I remove aHelmRelease
file from Git and commit it, Flux picks this up properly and deletes the correspondingHelmRelease
, but it also appears to create a new Helm release afterwards. This causes there to be orphaned Helm releases left without a correspondingHelmRelease
, and thus, this needs to be cleaned up manually. Example log:The text was updated successfully, but these errors were encountered: