devspace icon indicating copy to clipboard operation
devspace copied to clipboard

devspace open fails to open port-forward to services with named ports

Open nevalla opened this issue 4 years ago • 1 comments

What happened? When trying to open port-forward with devspace open, devspace fails to open port-forward to services that are using named ports.

? Select the service you want to open:  [Use arrows to move, type to filter]
  nginx-ingess-nginx-ingress-controller:0
  nginx-ingess-nginx-ingress-controller:0
> nginx-ingess-nginx-ingress-controller-default-backend:0
  postgres-postgresql:0
  redis-master:0

port definition for nginx-ingress-nginx-ingress-controller:

spec:
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: http

What did you expect to happen instead? Devspace allows to open port-forward also to named ports. Kubectl already supports this:

kubectl port-forward services/nginx-ingess-nginx-ingress-controller 8080:http

How can we reproduce the bug? (as minimally and precisely as possible) Install nginx helm chart and try to open port-forward with devspace open command.

/kind bug

nevalla avatar Sep 01 '21 07:09 nevalla

@nevalla thanks a lot for creating this issue! Yes you are correct, seems like this is a bug

FabianKramm avatar Sep 01 '21 10:09 FabianKramm