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: allow per-service configuration of protocol (mongodb:// for example) #2885

Closed
joeapearson opened this issue Jun 8, 2018 · 12 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@joeapearson
Copy link

joeapearson commented Jun 8, 2018

This is a feature request. In summary I'd like to be able to configure the output of minikube service to allow more accurate information to be displayed for our developers.

Environment:

Minikube version (use minikube version): v0.27.0

  • OS: macOS 10.13.4
  • VM Driver: virtualbox
  • ISO version: v0.26.0
  • Install tools: n/a
  • Others: n/a

What happened:

Using mongodb as an example, but this applies to any external service you'd like to expose that isn't http.

  1. Create a mongodb deployment
  2. Create a mongodb service
  3. Now list your running services as follows:
$ minikube service list --namespace default
|-------------|----------------------|--------------------------------|
|  NAMESPACE  |         NAME         |              URL               |
|-------------|----------------------|--------------------------------|
| default     | mongodb              | http://192.168.99.102:30321    |
|-------------|----------------------|--------------------------------|

What you expected to happen:

It'd be great if there were a way of configuring the service endpoint to display as mongodb://<ip>:<port> and be configurable on a service-by-service basis.

Very happy to submit a pull request for this although I could use some help in identifying an appropriate place to add it since this would be my first contribution.

@dlorenc
Copy link
Contributor

dlorenc commented Jun 11, 2018

Can you get this to work using the --format flag to "minikube service"?

@joeapearson
Copy link
Author

@dlorenc that would only work for a single service though I believe. If you had, for example, an http service and a mongo service running you'd want differing schemes for both.

@dlorenc
Copy link
Contributor

dlorenc commented Jun 11, 2018

Hmm, is there any way to detect from the service itself what protocol to use? I don't think it would be a very good idea to force users to configure this themselves.

@joeapearson
Copy link
Author

joeapearson commented Jun 11, 2018

Agreed that forcing users to configure it adds extra complexity. But don't you think an option would be fine?

Possibly could use the service port name, although that wouldn't fare so well for services that expose more than one endpoint of the same scheme.

For example, this abbreviated service config:

apiVersion: v1
kind: Service
spec:
  ports:
  - name: mongodb
    port: 27017
  - name: https
    port: 443
  - name: http
    port: 80

…would yield:

$ minikube service list
|-------------|----------------------|--------------------------------|
|  NAMESPACE  |         NAME         |              URL               |
|-------------|----------------------|--------------------------------|
| default     | https                | https://<cluster ip>:<port>    |
| default     | http                 | http://<cluster ip>:<port>     |
| default     | mongodb              | mongodb://<cluster ip>:<port>  |
|-------------|----------------------|--------------------------------|

@dlorenc
Copy link
Contributor

dlorenc commented Jun 11, 2018

Maybe I'm misunderstanding - for a single service example like you showed, you can do that with the --format flag. Does that make sense?

@joeapearson
Copy link
Author

Updated my earlier comment to make it a bit clearer I hope

@nomicode
Copy link

I have a service configured to expose two ports. one uses HTTP and the other uses the PostgreSQL wire protocol. so I am running into this issue too

instead of adding something to Minikube, would it make sense to change the column name to NETWORK ADDRESS and drop the http:// prefix?

the http:// is not required even for HTTP services, because the HTTP protocol is inferred by every HTTP client I am aware of

@tstromberg
Copy link
Contributor

This appears somewhat related to #3112

@tstromberg tstromberg changed the title Minikube service services are always treated as HTTP service: allow per-service configuration of protocol (mongodb:// for example) Sep 19, 2018
@tstromberg tstromberg added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 19, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 18, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 17, 2019
@tstromberg tstromberg added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Jan 23, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

6 participants