-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Informer framework #4
Comments
Object stores are included: https://github.com/kubernetes/client-go/tree/b7b3ea539440e6d0efc6ef4dab644108016788c0/1.4/tools/cache |
Many folks would like to refactor or eliminate the current informer entirely. |
Can you elaborate on this? I know that some people have suggested doing things differently, but what I've seen has only differed in implementation, nothing significant in the API interfaces. I also haven't seen much action on it. |
Yeah - I'm also completely not aware of people that want to remove informer (though we obviously can improve it) |
@hongchaodeng and @xiang90 and proposed a refactoring to the informer in the 1.4 cycle that was pushed out. I'd have to dig up the issue number. s/Eliminate/Choose not to use - Some folks that have designed their own controllers, simply do not use the informer. |
Is this the proposal in question? kubernetes/kubernetes#27519 +1 to this anyway, I would rather use the same thing upstream controllers use, whatever flaws it has, than attempt to roll my own |
That proposal isn't what kube uses. Kube uses the |
This was an oversight, we intended to include this library, too. |
It looks like @mikedanese is moving it anyway, so it should show up soon. |
Any news on this? Chomping at the bit to migrate over to this & really would like the informer framework in place to simplify migration. |
kubernetes/kubernetes#32718 Merged. This should hit the 1.5 client once it's synced. |
So this client gets automatically synced from kube repo then? How often does that happen? |
~ daily. But I need to approve a PR before the 1.5 client will show up here On Wed, Sep 21, 2016 at 8:28 AM, Jimmi Dyson [email protected]
|
If I'm looking to confine my Kubernetes dependencies to this repository, what's a good replacement for Type |
@lavalamp The 1.5/ sub directory is in but it doesn't include Informers. They are neither in the staging path in kubernetes/kubernetes. Anything we could do to speed this up? It's blocking/complicating some high priority stuff for us. |
The informer will show up after kubernetes/kubernetes#33334 gets merged. We need to manually run staging/src/k8s.io/client-go/copy.sh to populate changes to the staging area, then they will be published to client-go. |
@caesarxuchao can we include the workqueue, as well? |
I've been working today on porting my code that relies on |
Yeah, workqueue and cache.FIFO are somewhat different animals-- we should On Mon, Sep 26, 2016 at 9:54 AM, Steven E. Harris [email protected]
|
I see that kubernetes/kubernetes#33334 merged today. Is it the case that the next run of copy.sh will put the informer stuff into this repository? |
#33334 ran the copy.sh. The next run (every 12 hours) of the bot will push the change to client-go. |
Thar she blows! Commit 5974905 includes Should we expect it to arrive in the version 1.4 subtree soon, or is that out of scope? |
Depending on how bad people want it. It requires cherrypicking kubernetes/kubernetes#32718 and kubernetes/kubernetes#33334, i.e., it requires some labor. |
@caesarxuchao files under 1.5/tools/cache/ are in package testing, instead of cache, is it intended? see https://github.com/kubernetes/client-go/blob/master/1.5/tools/cache/controller.go#L17 |
No, it's a bug. I'll take a look. |
@caesarxuchao, I'm not sure when it's safe for me to start using the 1.5 subtree. Is it guaranteed to work against a Kubernetes version 1.3 cluster? That hesitation is what had me using the 1.4 subtree. |
The 1.5 subtree is backwards compatible. However, the go interface will not So if you use the 1.5 client, be aware that we may make interface changes I'm totally open to cherrypicking client changes into the 1.4 client The thing we absolutely cannot do is change the interface in the 1.4 On Wed, Sep 28, 2016 at 6:06 AM, Steven E. Harris [email protected]
|
Thank you for the explanation. I would appreciate a back-port, should one arrive soon, but in the meantime I'll try using the 1.5 client and see how it goes. |
As you're versioning this in line with kubernetes itself, this obviously goes against semver. Not that semver is a panacea but at least it gives a feel for API stability. |
Indeed, that's a great point. Maybe we should version the go client On Wed, Sep 28, 2016 at 10:35 AM, Jimmi Dyson [email protected]
|
As it's pulled together from the kubernetes repo, independent versioning would ultimately leek into that. Even if intentionally developing on the most recent version, having the the sanitized package layout is valuable. Maybe it's simplest to stick with freezing together with kubernetes but calling the non-frozen version "nightly" or "head"? |
We talked a fair amount about this at the API Machinery SIG just now. I Note that we haven't actually broken compatibility between 1.4 and 1.5 yet On Wed, Sep 28, 2016 at 11:07 AM, Fabian Reinartz [email protected]
|
I'll keep it open until we move workqueue. |
I'm not quite sure why github closed this? |
…heus Automatic merge from submit-queue decouple workqueue metrics from prometheus <!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md 2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md 3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes --> **What this PR does / why we need it**: We want to include the workqueue in client-go, but do not want to having to import Prometheus. This PR decouples the workqueue from prometheus. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # Partially address #33497 User requested for `workqueue` in client-go: kubernetes/client-go#4 (comment) **Special notes for your reviewer**: **Release note**: <!-- Steps to write your release note: 1. Use the release-note-* labels to set the release note state (if you have access) 2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. --> ```release-note The implicit registration of Prometheus metrics for workqueue has been removed, and a plug-able interface was added. If you were using workqueue in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/util/workqueue/prometheus". ```
informers and workqueue are in the master branch now. Closing. |
…heus Automatic merge from submit-queue decouple workqueue metrics from prometheus <!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md 2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md 3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes --> **What this PR does / why we need it**: We want to include the workqueue in client-go, but do not want to having to import Prometheus. This PR decouples the workqueue from prometheus. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # Partially address kubernetes/kubernetes#33497 User requested for `workqueue` in client-go: kubernetes/client-go#4 (comment) **Special notes for your reviewer**: **Release note**: <!-- Steps to write your release note: 1. Use the release-note-* labels to set the release note state (if you have access) 2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. --> ```release-note The implicit registration of Prometheus metrics for workqueue has been removed, and a plug-able interface was added. If you were using workqueue in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/util/workqueue/prometheus". ```
To write third-party controllers having
object stores andthe informer framework would be very handy.The text was updated successfully, but these errors were encountered: