application icon indicating copy to clipboard operation
application copied to clipboard

feat: use use port number instead of name

Open thisispr opened this issue 1 year ago • 3 comments

Based on https://kubernetes.io/docs/concepts/services-networking/ingress/

thisispr avatar Mar 18 '25 16:03 thisispr

@karl-johan-grahn are you still using this repo?

thisispr avatar Mar 31 '25 16:03 thisispr

Can you please explain why you're proposing this change?

aslafy-z avatar Mar 31 '25 16:03 aslafy-z

Can you please explain why you're proposing this change?

Sure, i already made a own version which is working with this change:

I need it, for that: (the service port is not http/80 or https/443) if you read the https://kubernetes.io/docs/concepts/services-networking/ingress/ doc, you will find aswell this implementation

service:
  enabled: true
  additionalLabels:
  annotations:
  ports:
    - port: 30020
      name: monitoring-http
      protocol: TCP
      targetPort: 8000
    - port: 30021
      name: wsproxy-http
      protocol: TCP
      targetPort: 8080
    - port: 30022
      name: wsproxy-https
      protocol: TCP
      targetPort: 8443
  type: ClusterIP
  
ingress:
  enabled: true
  ingressClassName: nginx
  hosts:
    - host: url.website
      paths:
        - path: /
          pathType: ImplementationSpecific
          servicePort: 30021

  annotations: {}
  tls:
    - secretName: tls
      hosts:
        - url.website

thisispr avatar Apr 01 '25 16:04 thisispr

Can you please explain why you're proposing this change?

@aslafy-z up up

thisispr avatar Apr 10 '25 05:04 thisispr

@aslafy-z @d3adb5 please review it and provide feedback

rasheedamir avatar Apr 15 '25 20:04 rasheedamir

@thisispr Why don't you use the service port name you're defining at service.ports inside your ingress? Just set ingress.hosts[0].paths[0].servicePort: wsproxy-http. I will go ahead and close this PR that adds a breaking change without adding value. Let me know if you need additional guidance.

aslafy-z avatar Apr 17 '25 07:04 aslafy-z