Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service: --format only outputs URLs, --https erroneously substitutes occurrences of http #3112

Closed
doodlesbykumbi opened this issue Sep 5, 2018 · 0 comments · Fixed by #3114
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@doodlesbykumbi
Copy link
Contributor

BUG REPORT

Environment:

Minikube version (use minikube version): v0.28.2

  • OS (e.g. from /etc/os-release): OSX

What happened:

  1. Created a Service
kubectl run echoserver --image=gcr.io/google_containers/echoserver:1.4 --port=8080
kubectl expose deployment echoserver --type=NodePort
  1. Used minikube service --format ... to generate a few variations of a formatted string
$ minikube service echoserver --format "{{.IP}}:{{.Port}}" --url
Error opening service: Check that minikube is running and that you have specified the correct namespace: parse 192.168.99.100:30563: first path segment in URL cannot contain colon
$ minikube service echoserver --format "http{{.IP}}:{{.Port}}" --url --https
https192.168.99.100:30563
$ minikube service echoserver --format "http.myservice:{{.Port}}" --url --https
https.myservice:30563
  • an error when the formatted string is not a URL
  • https is erroneously substituted when the prefix http was not part of the URL scheme

What you expected to happen:

  • formatted string can take any form I please
  • https should only be substituted when the URL scheme is http
$ minikube service echoserver --format "{{.IP}}:{{.Port}}" --url
192.168.99.100:30563
$ minikube service echoserver --format "http{{.IP}}:{{.Port}}" --url --https
http192.168.99.100:30563
$ minikube service echoserver --format "http.myservice:{{.Port}}" --url --https
http.myservice:30563

How to reproduce it (as minimally and precisely as possible):

See Above :)

@tstromberg tstromberg changed the title cmd(minikube service): --format only outputs URLs, --https erroneously substitutes any occurrence of http minikube service: --format only outputs URLs, --https erroneously substitutes any occurrence of http Sep 19, 2018
@tstromberg tstromberg changed the title minikube service: --format only outputs URLs, --https erroneously substitutes any occurrence of http service: --format only outputs URLs, --https erroneously substitutes occurrences of http Sep 19, 2018
@tstromberg tstromberg added the kind/bug Categorizes issue or PR as related to a bug. label Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
2 participants