fix(fluent-bit): align app.kubernetes.io/version label with image tag#727
Open
bhataprameya wants to merge 1 commit into
Open
fix(fluent-bit): align app.kubernetes.io/version label with image tag#727bhataprameya wants to merge 1 commit into
app.kubernetes.io/version label with image tag#727bhataprameya wants to merge 1 commit into
Conversation
The app.kubernetes.io/version label was hardcoded to .Chart.AppVersion, so it did not reflect the image actually deployed when image.tag was overridden. Resolve the label through a new fluent-bit.version helper that uses the overridden tag and falls back to the chart appVersion when the tag is unset or set to the "-" sentinel. Signed-off-by: Aprameya Bhat <abhat@roblox.com>
Collaborator
|
@bhataprameya you shouldn't be changing the chart tag to change the Fluent Bit version, you should be updating the chart. A Helm chart should be treated as a complete package and just because you can modify the tag to use a different version doesn't mean that it's supported or that you should do it. |
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.
What this does
The
app.kubernetes.io/versionlabel is hardcoded to.Chart.AppVersioninfluent-bit.labels. When a user overridesimage.tag, the deployed image andthe version label diverge — the label keeps reporting the chart's
appVersionwhile the pod runs the overridden tag.
This change resolves the label to the image actually deployed via a new
fluent-bit.versionhelper that returnsimage.tagwhen set, and falls back to.Chart.AppVersionwhen the tag is unset or the-sentinel is used (mirroringthe existing
fluent-bit.imagetag handling). The helper is also used by thetest-connection pod for consistency.
Behaviour
image.tagapp.kubernetes.io/version.Chart.AppVersion(unchanged)"-"(digest-only).Chart.AppVersion4.0.84.0.8Default behaviour is unchanged; the label only changes when
image.tagisoverridden.
Checklist
[UNRELEASED]versionbumped (0.57.6 → 0.57.7)helm lintpassesCloses #