Skip to content

fix(fluent-bit): align app.kubernetes.io/version label with image tag#727

Open
bhataprameya wants to merge 1 commit into
fluent:mainfrom
bhataprameya:fix/version-label-image-tag
Open

fix(fluent-bit): align app.kubernetes.io/version label with image tag#727
bhataprameya wants to merge 1 commit into
fluent:mainfrom
bhataprameya:fix/version-label-image-tag

Conversation

@bhataprameya

Copy link
Copy Markdown

What this does

The app.kubernetes.io/version label is hardcoded to .Chart.AppVersion in
fluent-bit.labels. When a user overrides image.tag, the deployed image and
the version label diverge — the label keeps reporting the chart's appVersion
while the pod runs the overridden tag.

This change resolves the label to the image actually deployed via a new
fluent-bit.version helper that returns image.tag when set, and falls back to
.Chart.AppVersion when the tag is unset or the - sentinel is used (mirroring
the existing fluent-bit.image tag handling). The helper is also used by the
test-connection pod for consistency.

Behaviour

image.tag app.kubernetes.io/version
unset (default) .Chart.AppVersion (unchanged)
"-" (digest-only) .Chart.AppVersion
e.g. 4.0.8 4.0.8

Default behaviour is unchanged; the label only changes when image.tag is
overridden.

Checklist

  • CHANGELOG.md entry added under [UNRELEASED]
  • Chart version bumped (0.57.6 → 0.57.7)
  • README regenerated (version bump only; no values changes)
  • helm lint passes
  • Commits signed off (DCO)

Closes #

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>
@stevehipwell

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants