kind: Service
apiVersion: v1
metadata:
  name: kafka-outside-0
  namespace: {{ .Release.Namespace }}
spec:
  selector:
    app: kafka
    kafka-broker-id: "0"
  ports:
    - protocol: TCP
      targetPort: 9094
      port: 32400
      nodePort: {{ .Values.service.kafka_outside_0 }}
  type: NodePort
---
kind: Service
apiVersion: v1
metadata:
  name: kafka-outside-1
  namespace: {{ .Release.Namespace }}
spec:
  selector:
    app: kafka
    kafka-broker-id: "1"
  ports:
    - protocol: TCP
      targetPort: 9094
      port: 32401
      nodePort: {{ .Values.service.kafka_outside_1 }}
  type: NodePort
---
kind: Service
apiVersion: v1
metadata:
  name: kafka-outside-2
  namespace: {{ .Release.Namespace }}
spec:
  selector:
    app: kafka
    kafka-broker-id: "2"
  ports:
    - protocol: TCP
      targetPort: 9094
      port: 32402
      nodePort: {{ .Values.service.kafka_outside_2 }}
  type: NodePort
---
kind: Service
apiVersion: v1
metadata:
  name: kafka-global-0
  namespace: {{ .Release.Namespace }}
spec:
  selector:
    app: kafka
    kafka-broker-id: "0"
  ports:
    - protocol: TCP
      targetPort: 9095
      port: 32500
      nodePort: {{ .Values.service.kafka_global_0 }}
  type: NodePort
---
kind: Service
apiVersion: v1
metadata:
  name: kafka-global-1
  namespace: {{ .Release.Namespace }}
spec:
  selector:
    app: kafka
    kafka-broker-id: "1"
  ports:
    - protocol: TCP
      targetPort: 9095
      port: 32501
      nodePort: {{ .Values.service.kafka_global_1 }}
  type: NodePort
---
kind: Service
apiVersion: v1
metadata:
  name: kafka-global-2
  namespace: {{ .Release.Namespace }}
spec:
  selector:
    app: kafka
    kafka-broker-id: "2"
  ports:
    - protocol: TCP
      targetPort: 9095
      port: 32502
      nodePort: {{ .Values.service.kafka_global_2 }}
  type: NodePort
---
apiVersion: v1
kind: Service
metadata:
  name: kafka-broker
  namespace: {{ .Release.Namespace }}
spec:
  type: NodePort
  ports:
    - port: 9094
      name: kafka
      protocol: TCP
      targetPort: 9094
      nodePort: {{ .Values.service.kafka_broker }}
  selector:
    app: kafka
---
apiVersion: v1
kind: Service
metadata:
  name: kafka-broker-global
  namespace: {{ .Release.Namespace }}
spec:
  type: NodePort
  ports:
    - port: 9095
      name: kafka
      protocol: TCP
      targetPort: 9095
      nodePort: {{ .Values.service.kafka_broker_global }}
  selector:
    app: kafka
