Skip to content

Conversation

@labuladong
Copy link
Member

@labuladong labuladong commented Jan 22, 2026

Summary

Add networking.podService and advertisedListeners configuration to PulsarBroker CR for Istio Federation/Multi-cluster scenarios.

  • Add networking.podService config (enabled, type, annotations, labels, ports)
  • Add advertisedListeners config for custom broker advertisement
  • Update both sn-platform and sn-platform-slim charts

Test Values

Use the following values file to test the feature:

# Test Broker Pod Service functionality
# Simulates Istio Federation scenario

broker:
  pulsarBroker:
    networking:
      podService:
        enabled: true
        type: ClusterIP
        annotations:
          sidecar.istio.io/inject: "true"
          test.streamnative.io/feature: "broker-pod-service"
        labels:
          app.kubernetes.io/managed-by: "pulsar-operator"
          test.streamnative.io/scenario: "istio-federation"
    # Use non-default port (6660) to avoid conflict with brokerServicePort (6650)
    advertisedListeners:
      - name: pod
        hostTemplate: "$(POD_NAME).test-namespace.svc.cluster.local"
        protocols:
          pulsar:
            advertisedPort: 6660
            containerPort: 6660

Verification

  1. Deploy with the test values:

    helm install test-pulsar ./sn-platform-slim -n test-namespace -f test-values.yaml
  2. Verify PulsarBroker CR contains correct config:

    kubectl get pulsarbroker -n test-namespace -o yaml | grep -A 20 "networking:"
  3. Verify per-pod Services are created:

    kubectl get svc -n test-namespace | grep broker
  4. Expected per-pod Services:

    • {cluster}-broker-0 with correct annotations/labels
    • {cluster}-broker-1 with correct annotations/labels
    • Services should include port 6660

Test plan

  • helm template renders correct YAML
  • Per-pod Services created with correct selector (statefulset.kubernetes.io/pod-name)
  • Custom annotations and labels applied to Services
  • Broker starts on configured listener port (6660)
  • Both sn-platform and sn-platform-slim charts work correctly

Add networking.podService and advertisedListeners configuration to
PulsarBroker CR for Istio Federation/Multi-cluster scenarios.

- Add networking.podService config (enabled, type, annotations, labels, ports)
- Add advertisedListeners config for custom broker advertisement
- Update both sn-platform and sn-platform-slim charts
@github-actions
Copy link

@labuladong:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions bot added the doc-info-missing This pr needs to mark a document option in description label Jan 22, 2026
@labuladong labuladong merged commit 8885cf8 into master Jan 22, 2026
4 checks passed
@labuladong labuladong deleted the donglai/per-pod-service branch January 22, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-info-missing This pr needs to mark a document option in description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants