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

Providing Events/Callbacks from Replication Controllers #4711

Closed
imesh opened this issue Feb 22, 2015 · 3 comments
Closed

Providing Events/Callbacks from Replication Controllers #4711

imesh opened this issue Feb 22, 2015 · 3 comments
Assignees
Labels
kind/support Categorizes issue or PR as a support question. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@imesh
Copy link
Contributor

imesh commented Feb 22, 2015

IMO it would be better to introduce a set of events or callbacks from Replication Controllers to notify Pod re-creation process to Kubernetes clients. Currently AFAIK when a Replication Controller recovers an inactive Pod the Pod ID changes. As a result the clients would not be able to manage those Pods afterwards. In addition when new Pods are created to match the number of replicas, it is not possible for a client to know the new Pod IDs unless it polls the Pod API method.

Apache Stratos is a Platform as a Service (PaaS) solution that uses Kubernetes to manage Docker containers in a clustered environment. Stratos has its own Autoscaling component. If it is possible for Kubernetes to introduce a set of events/callbacks from Replication Controllers, Stratos would be able to integrate with Kubernetes much more efficiently. Currently Stratos does not use Replication Controllers due to this problem. Appreciate your thoughts on this.

Thanks
Apache Stratos Team

@bgrant0607
Copy link
Member

First of all, agree we should provide hooks/events. See #2804 and #3692.

By "client", do you mean a client of the Kubernetes API, or a client of the service provided by the pods created by the replication controller -- that is, something connecting directly to the pods?

In most cases, we recommend that application clients connect through services rather than directly to the underlying pod IPs.

If Stratos itself needs to track the changes in pod IPs in a group, the Endpoints API provides that for groups for which you've created services. Our endpoint controller watches the services' label selectors and keeps the Endpoints lists up to date.

@bgrant0607 bgrant0607 self-assigned this Feb 22, 2015
@bgrant0607 bgrant0607 added kind/support Categorizes issue or PR as a support question. priority/support sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Feb 22, 2015
@imesh
Copy link
Contributor Author

imesh commented Mar 9, 2015

Hi @bgrant0607,

Thanks for your quick response! I went through #2804 and #3692, yes they are much similar to this requirement. By "client" what I meant is a client of the Kubernetes API, in this use-case client would be Stratos Cloud Controller.

The exact requirement we have here is to avoid overlapping of pod healing functionality in Stratos and Kubernetes. Stratos Autoscaler component has this functionality which would work on top of any Infrastructure as a Service (IaaS) platform. When using Kubernetes, we would like to let Kubernetes handle it as it would be much efficient to do it in Kubernetes layer.

If Kubernetes can generate an event or invoke a callback (I think an event would be much appropriate) with the details of the healed Pod and newly created Pod ID, Stratos could update its topology data structure accordingly.

I understand that Kubernetes already has an initiative to implement events and hooks in Replication Controller. If there is any opportunity we would like to contribute to this area.

Thanks

@bgrant0607
Copy link
Member

Let's move the discussion to #2804. We're not planning to do any work on that in the near future, so if you'd like that functionality, contributions would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

No branches or pull requests

2 participants