Addyvan / valheim-k8s

valheim game-server on kubernetes
MIT License
94 stars 45 forks source link

deployment template exposes TCP instead of UDP #24

Closed darkcloud784 closed 3 years ago

darkcloud784 commented 3 years ago

deployment template exposes TCP container ports instead of UDP.

        ports:
        - containerPort: 2456
          name: game1
        - containerPort: 2457
          name: game2
        - containerPort: 2458
          name: game3

Should be

        ports:
        - containerPort: 2456
          protocol: UDP
          name: game1
        - containerPort: 2457
          protocol: UDP
          name: game2
        - containerPort: 2458
          protocol: UDP
          name: game3
Addyvan commented 3 years ago

@darkcloud784 Thanks for pointing this out; however, if you look at the service we are exposing UDP there:

apiVersion: v1
kind: Service
metadata:
  name: valheim-server
spec:
  ports:
  - name: game1
    port: 2456
    targetPort: 2456
    protocol: UDP
  - name: game2
    port: 2457
    targetPort: 2457
    protocol: UDP
  - name: game3
    port: 2458
    targetPort: 2458
    protocol: UDP
  type: {{ .Values.networking.serviceType }}
  selector:
    app: valheim-server

Is there any drawback to not specifying it in the deployment?

Feel free to PR the change if you've tested it out and it works, I'm in favour of being more verbose.