blakeblackshear / blakeshome-charts

Repo for helm charts
47 stars 62 forks source link

NodePort for service doesn't work #62

Open xriser opened 8 months ago

xriser commented 8 months ago

The issue in the service template: https://github.com/blakeblackshear/blakeshome-charts/blob/master/charts/frigate/templates/service.yaml#L51C38-L58

The same value for the nodeport can't be used for multiple ports This leads to the error: Service "frigate-frigate" is invalid: spec.ports[1].nodePort: Invalid value: 31700: provided port is already allocated

SlavikCA commented 6 months ago

I got the same problem

I have this in my values.yaml:

service:
  type: NodePort
  port: 32071
  nodePort: 32070

And here is what I see in manifest:

# Source: frigate/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: frigate1
  labels:
    app.kubernetes.io/name: frigate
    helm.sh/chart: frigate-7.4.0
    app.kubernetes.io/instance: frigate1
    app.kubernetes.io/version: "0.13.1"
    app.kubernetes.io/managed-by: Helm
spec:
  type: NodePort
  ipFamilyPolicy: SingleStack
  ports:
    - name: http
      port: 32071
      protocol: TCP
      targetPort: http

      nodePort: 32070

    - name: rtmp
      port: 1935
      protocol: TCP
      targetPort: rtmp

      nodePort: 32070
...

That will not work, because one nodePort can not be used in 2 places.