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

PodInterface should support Watch #4777

Closed
alml opened this issue Feb 24, 2015 · 7 comments · Fixed by #5235
Closed

PodInterface should support Watch #4777

alml opened this issue Feb 24, 2015 · 7 comments · Fixed by #5235
Assignees
Labels
area/api Indicates an issue on api area. area/usability priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@alml
Copy link
Contributor

alml commented Feb 24, 2015

PodInterface should have Watch method behaving in the same way as ServiceInterface.Watch does.

Use case: a monitoring system (namely Prometheus) expects to get the list of monitored servers performing a DNS-SD query. Special service (similar to kube2sky shipped with Kubernetes) mirrors status of running Pods into etcd, which is in turn monitored by SkyDNS server and exported as DNS-SD. Schematically the data flow looks like this: Kubernetes -> kube2sky -> etcd -> SkyDNS -> Prometheus.

The biggest challenge is to deliver list of all running pods from Kubernetes to kube2sky. Currently kube2sky can only poll Kubernetes with PodInterface.List() each N seconds, which is not efficient. Having a Watch method would be much better.

@vishh vishh added team/master priority/backlog Higher priority than priority/awaiting-more-evidence. labels Feb 24, 2015
@vishh
Copy link
Contributor

vishh commented Feb 24, 2015

cc @lavalamp: Do you know why we do not support watch?

@bgrant0607
Copy link
Member

Every object should support Watch.

@bgrant0607 bgrant0607 added area/api Indicates an issue on api area. area/usability labels Feb 25, 2015
@bgrant0607
Copy link
Member

Watching status doesn't currently work -- that's #2726.

@lavalamp
Copy link
Member

I agree with OP. This is just an accident of history; some boilerplate in the client isn't completely filled out. As Brian mentions, not every field is currently watchable but that's being addressed elsewhere.

@pmorie
Copy link
Member

pmorie commented Feb 26, 2015

@sdminonne This is relevant to your interests potentially w/ your work on #560

@lavalamp
Copy link
Member

lavalamp commented Mar 3, 2015

This is a pretty simple change if someone wants to get their feet wet. :)

@jszczepkowski jszczepkowski self-assigned this Mar 9, 2015
@jszczepkowski
Copy link
Contributor

I'll work on it.

jszczepkowski added a commit to jszczepkowski/kubernetes that referenced this issue Mar 10, 2015
Added Watch support to PodInterface. Extended pods e2e to test watch. Resolves kubernetes#4777.
akram pushed a commit to akram/kubernetes that referenced this issue Apr 7, 2015
Added Watch support to PodInterface. Extended pods e2e to test watch. Resolves kubernetes#4777.
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/usability priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants