Skip to content

fix(base-cluster/monitoring): only roll out alloy tracing ports if enabled#2005

Open
cwrau wants to merge 1 commit intomainfrom
fix/base-cluster/alloy-tracing-ports
Open

fix(base-cluster/monitoring): only roll out alloy tracing ports if enabled#2005
cwrau wants to merge 1 commit intomainfrom
fix/base-cluster/alloy-tracing-ports

Conversation

@cwrau
Copy link
Member

@cwrau cwrau commented Feb 25, 2026

Otherwise the auto-checks if tracing is enabled always trigger

Summary by CodeRabbit

Release Notes

  • Chores
    • Optimized metrics port configuration in the monitoring collector setup and adjusted conditional logic to ensure proper configuration when tracing is enabled.

…abled

Otherwise the auto-checks if tracing is enabled always trigger
Copilot AI review requested due to automatic review settings February 25, 2026 10:45
@cwrau cwrau enabled auto-merge February 25, 2026 10:45
@gemini-code-assist
Copy link

Summary of Changes

Hello @cwrau, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the Alloy collector's port configuration within the Helm chart to prevent unnecessary auto-checks from triggering when distributed tracing is not enabled. By making tracing-specific ports conditional on the monitoring.tracing.enabled flag, it ensures that only relevant ports are exposed, thereby improving the efficiency and accuracy of monitoring deployments.

Highlights

  • Conditional Tracing Ports: The Jaeger (compact, gRPC, HTTP) and Zipkin tracing ports for the Alloy collector are now conditionally included in the Kubernetes service definition. These ports will only be rolled out if monitoring.tracing.enabled is set to true in the Helm values.
  • Unconditional Metrics Port: The metrics port (8888) for the Alloy collector has been moved outside the tracing conditional block, ensuring it is always exposed regardless of whether tracing is enabled or disabled.
Changelog
  • charts/base-cluster/templates/monitoring/alloy-collector.yaml
    • Wrapped Jaeger and Zipkin tracing ports within a conditional block, ensuring they are only exposed when monitoring.tracing.enabled is true.
    • Relocated the metrics port definition to be outside the tracing conditional block, making it always available.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the telemetry-collector Alloy HelmRelease template so tracing-related service ports are only exposed when tracing is enabled, preventing “tracing-enabled” auto-checks from being triggered by always-present ports.

Changes:

  • Wrap Jaeger/OTLP/Zipkin extraPorts entries behind {{- if .Values.monitoring.tracing.enabled }}.
  • Keep the metrics port (8888/TCP) always exposed to support scraping regardless of tracing.

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

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to make the tracing-related ports for the Alloy collector conditional based on whether tracing is enabled. The logic is sound, but there is a critical indentation error in the Helm template that will cause YAML rendering to fail if tracing is enabled. I've provided a specific comment with a code suggestion to correct the indentation and ensure the template renders correctly.

@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd4d995 and 0efba07.

📒 Files selected for processing (1)
  • charts/base-cluster/templates/monitoring/alloy-collector.yaml

📝 Walkthrough

Walkthrough

Modified the Alloy collector Helm chart template to reorganize port definitions. Relocated the metrics port (8888) entry from within the jaeger section to the top-level extraPorts and adjusted conditional block boundaries to properly wrap extraPorts within the tracing-enabled conditional structure.

Changes

Cohort / File(s) Summary
Alloy Collector Port Configuration
charts/base-cluster/templates/monitoring/alloy-collector.yaml
Relocated metrics port definition from jaeger-adjacent block to top-level extraPorts section; reorganized conditional block placement to wrap extraPorts within tracing-enabled conditional logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • tasches
  • marvinWolff
  • teutonet-bot

Poem

🐰 A port finds new home, from jaeger's side,
To metrics' place where configs reside,
The braces align with conditional care,
Eight-eighty-eight flows without a despair! 📊

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: conditionally including alloy tracing ports only when tracing is enabled, which matches the modifications made to the YAML configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/base-cluster/alloy-tracing-ports

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants