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

Include workqueue in client-go #33497

Closed
caesarxuchao opened this issue Sep 26, 2016 · 5 comments
Closed

Include workqueue in client-go #33497

caesarxuchao opened this issue Sep 26, 2016 · 5 comments
Assignees
Labels
sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@caesarxuchao
Copy link
Member

workqueue is useful for building controllers. It should be included in client-go.

kubernetes/client-go#4

@caesarxuchao caesarxuchao added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Sep 26, 2016
@caesarxuchao caesarxuchao self-assigned this Sep 26, 2016
@seh
Copy link
Contributor

seh commented Sep 26, 2016

One annoyance is file metrics.go, which drags in the Prometheus client library.

@caesarxuchao
Copy link
Member Author

caesarxuchao commented Sep 26, 2016

@krousey had done some work to not importing Prometheus: #30638. It would be appreciated if someone could repeat the process for the workqueue's metrics.go.

@seh
Copy link
Contributor

seh commented Sep 26, 2016

@caesarxuchao, is this inclusion something you expect to work on soon?
I need to decide whether I should wait on workqueue arriving in client-go, or whether I should continue working around its lack.

@caesarxuchao
Copy link
Member Author

It will be two steps, removing the import of Prometheus and then including workqueue in client-go. I estimate the process will take 2 weeks.

@seh
Copy link
Contributor

seh commented Sep 27, 2016

Thank you. I'll continue with my workaround (using cache.FIFO) for now, and watch for the chance to remove it when workqueue lands later.

k8s-github-robot pushed a commit that referenced this issue Oct 6, 2016
…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".
```
mfojtik pushed a commit to mfojtik/kubernetes that referenced this issue Jan 2, 2017
Automatic merge from submit-queue

Copy workqueue to client-go

The workqueue is very useful when building controllers, so this PR copied it to client-go's staging area.

Fix kubernetes#33497
perotinus pushed a commit to kubernetes-retired/cluster-registry that referenced this issue Sep 2, 2017
…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".
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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