Skip to content

Conversation

@amwarrier
Copy link
Contributor

@amwarrier amwarrier commented Feb 3, 2026

The weave-trace-configmap had a hardcoded KAFKA_BROKER_HOST value of "bufstream.bufstream.svc.cluster.local", which prevented customers from deploying bufstream in custom namespaces. When customers used bufstream.namespaceOverride (e.g., wandb-bufstream), weave-trace and weave-trace-worker could not connect to the correct bufstream service.

  • Updated wandb.kafka.brokerHost helper in _queues.tpl to return full FQDN including namespace when bufstream is installed
  • Changed weave-trace.yaml to use the helper function instead of hardcoded value
  • Added fallback to "bufstream.bufstream.svc.cluster.local" when neither kafka nor bufstream are installed locally (assumes external bufstream)

Summary by CodeRabbit

  • Refactor

    • Kafka broker host resolution now uses namespace-aware Kubernetes DNS instead of hardcoded hostnames.
    • Broker host and port settings are sourced from reusable Helm templates for more consistent configuration.
  • Chore

    • Chart version incremented to reflect the configuration updates.

The weave-trace-configmap had a hardcoded KAFKA_BROKER_HOST value of
"bufstream.bufstream.svc.cluster.local", which prevented customers from
deploying bufstream in custom namespaces. When customers used
bufstream.namespaceOverride (e.g., wandb-bufstream), weave-trace and
weave-trace-worker could not connect to the correct bufstream service.

- Updated wandb.kafka.brokerHost helper in _queues.tpl to return full
  FQDN including namespace when bufstream is installed
- Changed weave-trace.yaml to use the helper function instead of
  hardcoded value
- Added fallback to "bufstream.bufstream.svc.cluster.local" when
  neither kafka nor bufstream are installed locally (assumes external
  bufstream)
@amwarrier amwarrier requested a review from a team as a code owner February 3, 2026 19:14
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Updated Helm chart templates to make Kafka broker host/port resolution dynamic and namespace-aware: bufstream host resolution now uses release namespace with override support, weave-trace uses template lookups for broker host and port, and chart version was bumped.

Changes

Cohort / File(s) Summary
Kafka broker template
charts/operator-wandb/templates/_queues.tpl
When bufstream is installed and brokerHost is empty, compute namespace from .Release.Namespace and .Values.bufstream.namespaceOverride and return bufstream.<namespace>.svc.cluster.local; fallback remains bufstream.bufstream.svc.cluster.local or .Values.global.kafka.brokerHost.
Weave trace config
charts/operator-wandb/templates/weave-trace.yaml
Replaced hard-coded Kafka broker host/port with Helm template includes wandb.kafka.brokerHost and wandb.kafka.brokerPort in the YAML data block.
Chart metadata
charts/operator-wandb/Chart.yaml
Bumped chart version from 0.40.0 to 0.40.1.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • vanpelt
  • jsbroks
  • danielpanzella

Poem

🐰 In templated fields I nibbled away,
I stitched namespaces where bufstreams play,
No more hard hosts to trip and hide,
Dynamic hops now guide the guide,
Cheerful bytes beneath the cluster sky 🥕✨

🚥 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: making the bufstream hostname configurable for weave-trace by replacing hardcoded values with templated lookups.
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 aravind/fix-weave-trace-buf-ns

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.

Copy link
Contributor

@dacbd dacbd left a comment

Choose a reason for hiding this comment

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

Something funky is going on; the snapshots' namespace shouldn't be changing.

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.

3 participants