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

Add port annotations to know what protocols a port will support for pods, maybe services #6908

Closed
jwforres opened this issue Apr 16, 2015 · 13 comments
Labels
area/api Indicates an issue on api area. area/ui lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/service-catalog Categorizes an issue or PR as relevant to SIG Service Catalog.

Comments

@jwforres
Copy link
Contributor

There are several use cases where knowing what protocols a port on a container in a pod actually supports would affect information presented to end users.

Ex 1:
I have a container in a pod exposing port 8080, do we show a clickable link in the GUI? Right now we have to assume it exposes http(s) and always show the link, or never show a link. If the port was annotated to say that it supported http(s) we would know for sure.

Ex 2:
I have a container in a pod exposing port 8080, I don't have any services routing to the pod. Should I recommend to the end user that they create a service? If the port were annotated to say that it exposes http(s) then we would be more likely to suggest they create a service than if it was annotated to expose a different protocol.

@jwforres
Copy link
Contributor Author

CC @danmcp @smarterclayton

@smarterclayton
Copy link
Contributor

It gets complicated very fast to define a "protocol" language other than by convention. Some things that we've considered in the past

Most people want to know whether a port is HTTP or HTTPS, and some people want to know whether that supports web sockets (or should support web sockets). A few people want to know whether a port is mysql, and some want to know whether it's really mysql+tls. A lot of people want to annotate ports that are debugging ports so that automation tools don't expose them automatically.

@erictune
Copy link
Member

In the gui, how about show a link if the port is 80, 443, 8008, or 8080, and not otherwise?
Should do something reasonable in a lot of cases?

@erictune erictune added priority/design sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Apr 16, 2015
@jwforres
Copy link
Contributor Author

The http(s) links were just an example, there are more use cases than that.

An annotation could let us know that the port is an admin console port, letting us show a special icon next to that link. Same with a debug port.

Or lets say I support ftp on the port, and I want to actually make the URL in the GUI have the ftp:// protocol.

@smarterclayton
Copy link
Contributor

A lot of web frameworks these days choose completely random ports - for instance rails defaults to 3000, django is 8000, etc. 80 is usually http, but 443 can be anything. Mysql is 3306, but might not be.

I think the idea is more to allow metadata to decorate endpoints that can be interpreted by programs, rather than not being able to attach metadata at all. That metadata might also be something like the default timeout, or something else that a consumer might reasonably need to know.

This also applies to service ports, pods were just one place to start.

----- Original Message -----

The http(s) links were just an example, there are more use cases than that.

An annotation could let us know that the port is an admin console port,
letting us show a special icon next to that link. Same with a debug port.

Or lets say I support ftp on the port, and I want to actually make the URL in
the GUI have the ftp:// protocol.


Reply to this email directly or view it on GitHub:
#6908 (comment)

@thockin
Copy link
Member

thockin commented Apr 16, 2015

Ports have names. We can define best-practices there (eg naming your port
"http" is a clue that it supports http. Once we have SRV fixed up (if you
all would just stop emailing me :) you will be able to do do SRV lookups
for _http._tcp.mysvc.myns.kubernetes.local - but the _http is only known
insofar as the port name.

I'm open to proposals how to annotate more or better.

On Thu, Apr 16, 2015 at 12:13 PM, Clayton Coleman notifications@github.com
wrote:

A lot of web frameworks these days choose completely random ports - for
instance rails defaults to 3000, django is 8000, etc. 80 is usually http,
but 443 can be anything. Mysql is 3306, but might not be.

I think the idea is more to allow metadata to decorate endpoints that can
be interpreted by programs, rather than not being able to attach metadata
at all. That metadata might also be something like the default timeout, or
something else that a consumer might reasonably need to know.

This also applies to service ports, pods were just one place to start.

----- Original Message -----

The http(s) links were just an example, there are more use cases than
that.

An annotation could let us know that the port is an admin console port,
letting us show a special icon next to that link. Same with a debug port.

Or lets say I support ftp on the port, and I want to actually make the
URL in
the GUI have the ftp:// protocol.


Reply to this email directly or view it on GitHub:

#6908 (comment)


Reply to this email directly or view it on GitHub
#6908 (comment)
.

@thockin thockin added kind/design Categorizes issue or PR as related to design. and removed kind/design Categorizes issue or PR as related to design. priority/design labels May 19, 2015
@bgrant0607 bgrant0607 added kind/enhancement priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. and removed kind/design Categorizes issue or PR as related to design. labels Jun 2, 2015
@bgrant0607
Copy link
Member

cc @janetkuo

@bgrant0607 bgrant0607 added priority/backlog Higher priority than priority/awaiting-more-evidence. team/ux area/ui area/api Indicates an issue on api area. and removed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Aug 5, 2015
@bgrant0607
Copy link
Member

Example use case: Determine whether to construct a proxy or portforward URL to the application.

I think this should be more than just annotations -- we should extend the API. I haven't had time to think about a concrete proposal, though.

There's other application information we'll want. For example, see #5721.

@bgrant0607
Copy link
Member

Proposal: #14828

@bgrant0607
Copy link
Member

cc @ggogolowicz

@bgrant0607 bgrant0607 added the sig/service-catalog Categorizes an issue or PR as relevant to SIG Service Catalog. label Aug 30, 2016
@bgrant0607
Copy link
Member

@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.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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 21, 2017
@thockin
Copy link
Member

thockin commented Dec 23, 2017

We have application-protocol coming (annotation for now)

@thockin thockin closed this as completed Dec 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Indicates an issue on api area. area/ui lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/service-catalog Categorizes an issue or PR as relevant to SIG Service Catalog.
Projects
None yet
Development

No branches or pull requests

7 participants