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

🐛 Serve metrics even if not leader #197

Merged
merged 1 commit into from
Nov 28, 2018

Conversation

JoelSpeed
Copy link
Contributor

Fixes #196.

Move metrics serving to before we separate into the leader election vs non leader election start process.

This allows prometheus to count non-leader targets as up, but will just receive an empty response for non-leaders and so no inaccurate metrics are collected.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 3, 2018
@DirectXMan12
Copy link
Contributor

/kind bug
/priority important-soon

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Nov 5, 2018
@DirectXMan12
Copy link
Contributor

I think this LGTM.

Looks like the test issue is in the metrics test: https://travis-ci.org/kubernetes-sigs/controller-runtime/jobs/450256058#L617

@DirectXMan12
Copy link
Contributor

Looks like it's affecting multiple PRs (e.g. #193). I'd guess it's a flake. I'm going to fork off a separate bug.

@JoelSpeed
Copy link
Contributor Author

@DirectXMan12 I've rebased this now #200 is merged, tests are passing now

@DirectXMan12
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 13, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12, JoelSpeed

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 13, 2018
@DirectXMan12
Copy link
Contributor

looks like there's a merge conflict. rebase and we'll get this merged.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 16, 2018
@JoelSpeed
Copy link
Contributor Author

@DirectXMan12 Rebased, should be good to go now

@DirectXMan12
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2018
@DirectXMan12 DirectXMan12 changed the title Serve metrics even if not leader ✨ Serve metrics even if not leader Nov 28, 2018
@DirectXMan12 DirectXMan12 changed the title ✨ Serve metrics even if not leader 🐛 Serve metrics even if not leader Nov 28, 2018
@k8s-ci-robot k8s-ci-robot merged commit 9bfe5fd into kubernetes-sigs:master Nov 28, 2018
justinsb pushed a commit to justinsb/controller-runtime that referenced this pull request Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants