Repository navigation
fix: clear outdated_helm_chart for charts no longer referenced - #2036
Merged
gianlucam76 merged 1 commit intoOct 15, 2026
Merged
gianlucam76 merged 1 commit into
gianlucam76 merged 1 commit into
Conversation
reconcileOutdatedHelmChartMetric carried forward every outdated chart that was not checked in the current pass. That is meant for a chart whose repository could not be fetched, but it also kept a chart that no ClusterSummary references anymore, because its ClusterSummary was deleted or the chart was removed from its profile. Such a chart is never checked again, so its outdated_helm_chart series stayed at 1 until the addon-controller restarted. Record in the pass state the charts collected from the ClusterSummaries, and carry forward only the ones that are still referenced.
gianlucam76
approved these changes
Oct 15, 2026
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.
Fixes #2030
reconcileOutdatedHelmChartMetriccarried forward every outdated chart that was not checked in the current pass. That is meant for a chart whose repository could not be fetched, but it also caught a chart that no ClusterSummary references anymore: its ClusterSummary was deleted, or the chart was removed from the profile. Such a chart is never checked again, so itsoutdated_helm_chartseries stayed at 1 until the addon-controller restarted.The pass now records the charts it collects from the ClusterSummaries (
markReferenced), andreconcileOutdatedHelmChartMetriccarries forward only an unchecked chart that is still referenced. A chart whose fetch failed keeps its series, as before. I also fixed the comment onoutdatedHelmChartGauge: it said the gauge is reset on every pass, which the checker deliberately doesn't do.The tests in
helmchart_outdated_check_test.gorun a wholecheckOutdatedHelmChartspass against a fake client, after a pass that found the chart outdated:httptest: the series is gone.make testandmake lintpass.@gianlucam76 this follows the direction from the issue.