cp-helm-charts icon indicating copy to clipboard operation
cp-helm-charts copied to clipboard

NodePort service.yaml for cp-kafka uses incorrect value for targetPort

Open fbascheper opened this issue 4 years ago • 0 comments

The nodeport-service.yaml file in cp-kafka/templates contains an incorrect value for targetPort. According to the NodePort definition from kubernetes.io by default and for convenience, the targetPort is set to the same value as the port field for a NodePort.

However, in nodeport-service.yaml, I see the following

spec:
  type: NodePort
  ports:
    - name: external-broker
      port: {{ $servicePort }}
      targetPort: {{ $externalListenerPort }}
      nodePort: {{ $externalListenerPort }}
      protocol: TCP

This should be changed to

spec:
  type: NodePort
  ports:
    - name: external-broker
      port: {{ $servicePort }}
      targetPort: {{ $servicePort }}
      nodePort: {{ $externalListenerPort }}
      protocol: TCP

After this change, all nodeports were functioning OK for us.

fbascheper avatar Oct 07 '21 08:10 fbascheper