[fix] helm fallback: resource adoption, werf-chart guard and telemetry#804
Draft
Fkuloff wants to merge 7 commits into
Draft
[fix] helm fallback: resource adoption, werf-chart guard and telemetry#804Fkuloff wants to merge 7 commits into
Fkuloff wants to merge 7 commits into
Conversation
Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
4 tasks
Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
…f annotations Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
…ad of renaming it Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
…ership Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
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.
Overview
Three changes to the nelm → helm3lib fallback path:
TakeOwnership) instead of failing.werf.io/*annotations is never handed to helm3lib.d8_telemetry_prefix.What this PR does / why we need it
Adoption.
EnsureConversionWebhooksapplies a module'sConversionWebhookbefore the module's Helm release, so the object exists without Helm ownership markers and the release refuses to import it:Only the helm3lib path is affected — the nelm client already runs with
ForceAdoption: true— so a module that falls back never converges.TakeOwnership(helm v3.17+) skipscheckOwnershipand lets Helm adopt the object and stamp the markers itself, from its own release name and namespace. Not set on the dry-run render action.werf guard. helm3lib does not implement
werf.io/*semantics: ordering (werf.io/weight,werf.io/deploy-dependency-*), tracking (werf.io/track-termination-mode). Handing such a chart to it deploys the module in a different order, silently. The chart sources are now scanned forwerf.io/before falling back; if an annotation is found — or the chart cannot be scanned — nelm's error is reported instead.Telemetry.
helm_fallback_total→d8_telemetry_helm_fallback_total, so Flant telemetry collects how often releases silently degrade to helm3lib. Labels unchanged. The prefix is hardcoded because addon-operator cannot import Deckhouse'stelemetry.WrapName, andInitMetricsapplies a single prefix to every metric.Verified on a cluster, A/B with only the
addon-operatorversion changed: without the fix the module stays inErrorwithinvalid ownership metadataand retries forever; with it the module converges and Helm stamps the ownership markers on the pre-applied webhook itself.