-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Support for user-customizeable links in Pods, Service and StatefulSets through Annotations #1989
Comments
@floreks any feedback on this FR? We're actually considering doing something like this ourselves and would rather do it in a way that could be up-streamable. |
Dashboard can already show simple links (using labels I guess). Maybe a starting point. |
I like the general idea. I don't see any reason why we couldn't have that upstream. It is generic enough and templating variables like in grafana could be used by users in many different ways. You are welcome to work on that as I think we won't be able for some time. |
I agree with others, sounds enough generic to push it to upstream. |
In general I like the idea. I think the proposal about pods is not working exactly as you suggest.
First, pods are not reachable from outside of cluster, second I am not sure if pods have dns entries, do they? So, I think the annotation should be rather moved to the service resource. Lets make the use case a bit more generic: lets say you deploy wordpress. In case you create a service that is external reachable (type load-balancer), we already create a clickable link. This behavior has two problems:
So, some meta-tags that describe the service for dashboard would make sense. The second use case for the integration with a monitoring tool I would suggest to solve a bit differently. So, my proposal would be to add a url setting on our global settings page (based on config-map) to add a link to every pod. If a user would enable Prometheus plugin we could automatically add this URL setting. So, automatically all pods would be linked to prometheus without changing any pod definition @floreks, @maciaszczykm WDYT? |
@cheld You are right, there are few things to consider as not in all cases DNS/specific monitoring tool will be there up and running. At the moment only possibility is to check everything and then add link, but like you said we might wait for @floreks' pull request which will introduce integrations/settings page. Then if we are sure, that for example Prometheus is installed and running we can add links to all pods (or just to one based on metadata from annotation). Still DNS doesn't sound like Dashboard integration, so I don't know if we will be considered like one. If not then we would have to make health check on our own, because there should be no link if it won't work. However, I would wait for @mwitkow to elaborate a bit more on his proposal. Maybe preparing some simple proof of concept would clarify a lot of things. |
@maciaszczykm Ok, I try to explain my idea agian.
This list is edited manually
|
This is an interesting proposal. What do you think of extending the scope of this a bit and invite all K8s UIs to collaborate here. The idea is that whatever if we introduce something only here it is likely to stay niche and low use. If something is Kubernetes-global it is likely that service providers integrate by their own. E.g., when you install grafana, you get integration for free. @mwitkow @floreks @maciaszczykm @cheld WDYT? |
Reference discussion: kubernetes/community#122 |
Similar request: #2008 |
The reason why we want per POD links is that a lot of servers (e.g. Elastic Search, many Go servers) have per-instance troubleshooting interfaces. Accessing them via And yes, there are DNS entries for PODs, see the Pods Section of DNS docs.
The use case I'm particularly interested in is as follows:
At the same time, I agree with @bryk's idea that certain things should be pluggable at a higher level, and would be great if certain things came for free. So I propose: Can we do both? I'd be happy to get working on b), and it seems like a really easy win. I would happily partake in the discussion about a), but I'd propose we keep them separate. |
Ok, I understand. Lets focus on pod and service URLs for the moment. In general we should aim for a generic and portable solution. Service and pods could be accessed through apiserver proxy. So we have to describe only the suffix path, e.g. /metrics, /admin, /ui |
@cheld Thanks. As for the API server proxy URL, can we make it not hard coded and instead expose it as a template variable like {{proxy_url}}? Users have different ways of accessing Pods, and don't necessarily use the API server proxy. For example, we have our own edge server that routes based on DNS addresses. I know other people use VPN and would prefer this to be access over IP without DNS. Having the proxy URL as a template would be the best of both worlds: easy to use for most early adopters, while providing flexibility for others. |
I like the idea of templates for the reasons @mwitkow explained. Some folks can clusters tied to their corp network and able to see individual pods. Some may want to do this via external LB. |
@mwitkow I'm thinking whether we covered all use cases for this problem. Would implementing this proposal cover all you cases? Do you see any other extensions we can cover? |
It'd be great to have per-resource annotations that are templated, yes! :) Just to clarify we're talking about annotations that have template variables for:
|
@mwitkow I think we can move forward as you suggested. However, I am thinking about it like absolute/relative URL paths. A URL
In general, I don't object absolute URLs as long as they are not default or recommended. In the documentation I would suggest to make |
@cheld I see. These make sense. I think we're mostly agreed on the semantics, the only thing I think is that I think we don't need the extra How in documentation examples we use: However, users who don't care can still |
Yes, we can start like in your example. (In future step we could make |
/CC @kenan435 |
This is something I really miss from the Borg UI. In that case, it's the pod that writes out a file with a bunch of links, but that's mainly because Borg has no labels or annotations (and, I think, the feature predates Borg itself). My vote would be for cluster-wide settings like |
Looking at this issue and started some development work. @mwitkow do you think you can have something committed anytime soon? If not I'll take it :) |
Is there any progress on this? #2332 is quite similar and I am interested if and how it fits current design. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Something like this would also be super useful for a multi-cluster setup to link to objects owned in another cluster. |
Environment
Standard pre-built docker container.
Feature Request
It would be fantastic to be able to leverage Kubernetes dashboard as a command and control place for all your services by cross-linking the relevant resources for a Service, StatefulSet or a Pod.
This could be done either through
Use cases
Adding links to
/debug
pages of PodsA lot of go servers expose
/debug
pages, e.g./debug/requests
. It would be fantastic for users to be able to add links to the relevant endpoints with the Pod's DNS address.For example, an annotation for Pod:
Adding links to monitoring dashboards for Services
It would be fantastic to be able to link from a Service page to other, richer monitoring services. For example with Grafana you can cross link to a dashboard using templating variables:
For example, an annotation for Service :
It would be fantastic if it was generic enough to access any property of the Pod or Service definition, but simple things such as DNS name, cluster name and Pod/Service/StatefulSet name would be enough.
We would be happy contributing support for this feature :)
The text was updated successfully, but these errors were encountered: