diff --git a/charts/pulsar/templates/broker-service.yaml b/charts/pulsar/templates/broker-service.yaml index 5f0161b..f9cd1c7 100644 --- a/charts/pulsar/templates/broker-service.yaml +++ b/charts/pulsar/templates/broker-service.yaml @@ -29,6 +29,7 @@ metadata: annotations: {{ toYaml .Values.broker.service.annotations | indent 4 }} spec: + type: ClusterIP ports: # prometheus needs to access /metrics endpoint - name: http @@ -43,7 +44,7 @@ spec: - name: "{{ .Values.tlsPrefix }}pulsarssl" port: {{ .Values.broker.ports.pulsarssl }} {{- end }} - clusterIP: None + clusterIP: "{{ .Values.broker.service.clusterIP }}" selector: {{- include "pulsar.matchLabels" . | nindent 4 }} component: {{ .Values.broker.component }} diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index 1094510..22ad8f0 100755 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -861,6 +861,12 @@ broker: ## templates/broker-service.yaml ## service: + # clusterIP can be one of the three, which determines the type of k8s service deployed for broker + # 1. a valid IPv4 address -> non-headless service, let you select the IPv4 address + # 2. '' -> non-headless service, k8s picks an IPv4 address + # 3. 'None' -> headless + # Ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-clusterip + clusterIP: "None" annotations: {} ## Broker PodDisruptionBudget ## templates/broker-pdb.yaml