Skip to content

fix: enable dual-stack for Fluent Bit metrics services - #2273

Merged
csatib02 merged 1 commit into
kube-logging:masterfrom
vyncint:fix/fluentbit-metrics-ipv6
Jul 21, 2026
Merged

csatib02 merged 1 commit into
kube-logging:masterfrom
vyncint:fix/fluentbit-metrics-ipv6

Conversation

@vyncint

@vyncint vyncint commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • configure Fluent Bit metrics and buffer metrics Services for dual-stack networking when enabledIPv6 is enabled
  • preserve the existing IP family behavior when enabledIPv6 is disabled
  • add focused unit coverage for both modes

Testing

  • make check
  • make check-diff

Fixes #2238

Copilot AI review requested due to automatic review settings July 20, 2026 23:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Fluent Bit resource generation so that the operator renders the Fluent Bit metrics and buffer metrics Service objects as dual-stack when enabledIPv6: true is set on the FluentbitSpec, while leaving the existing single-stack behavior unchanged when IPv6 is disabled. This aligns Fluent Bit’s metrics Services with the expected IPv6 behavior described in issue #2238.

Changes:

  • Apply PreferDualStack + [IPv4, IPv6] ipFamilies to Fluent Bit metrics and buffer-metrics Services when EnabledIPv6 is true.
  • Preserve existing behavior (no explicit IP-family fields set) when EnabledIPv6 is false.
  • Add unit tests validating both single-stack and dual-stack rendering for both Services.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/resources/fluentbit/service.go Conditionally applies IPv6/dual-stack ServiceSpec options for Fluent Bit metrics and buffer-metrics Services.
pkg/resources/fluentbit/service_test.go Adds focused unit coverage asserting the Service IP family fields in both IPv6-disabled and IPv6-enabled modes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@promptless-for-oss

Copy link
Copy Markdown

📝 Promptless drafted a documentation update for this change.

We've prepared a "What's new" entry documenting that setting enabledIPv6: true now also enables dual-stack networking for the Fluent Bit metrics and buffer-volume metrics Services, so those metrics endpoints are reachable over IPv6 on dual-stack clusters — matching the behavior already documented for Fluentd and syslog-ng.

Because this change hasn't shipped in a release yet, the note is currently filed under an "Unreleased" heading; the version heading should be updated to the actual release once this PR merges and is cut into a release.

Review the suggestion here: https://app.gopromptless.ai/suggestions/fac15125-2213-4ded-87c3-444ad974009b

@csatib02

Copy link
Copy Markdown
Member

Thanks @vyncint!

@csatib02
csatib02 merged commit c3e3f9e into kube-logging:master Jul 21, 2026
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FluentBit metrics service scraping over IPv6

4 participants