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

Prometheus should scrape the router by default #18254

Merged

Conversation

smarterclayton
Copy link
Contributor

Builds on top of #18245 and will scrape the installed router by default. We ensure that the router by default will be using a serving cert to serve metrics, then add new roles, bindings, and a prometheus-scraper service account that has permission to scrape it.

For 3.10

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 23, 2018
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 23, 2018
@smarterclayton
Copy link
Contributor Author

/retest

Failed on a bunch of flakes #18258, #17330

@smarterclayton
Copy link
Contributor Author

/test gcp

@smarterclayton
Copy link
Contributor Author

/test all

@smarterclayton
Copy link
Contributor Author

@ramr

Copy link
Contributor

@ramr ramr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - comment re: minor cleanup for later.

@@ -730,13 +753,6 @@ func RunCmdRouter(f *clientcmd.Factory, cmd *cobra.Command, out, errout io.Write
},
}

if cfg.StatsPort > 0 && cfg.ExposeMetrics {
pc := generateMetricsExporterContainer(cfg, env)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think the generateMetricsExporterContainer function isn't used anywhere else, if you are removing this code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

When router stats are on, use the service serving cert always
Add a new scrape target for the router. The router requires a token with
permission to see routers/metrics in route.openshift.io, so create a new
service account specifically for scraping and add the appropriate roles.
Also create an out of the box prometheus-reader service account which
has view access on the current project.
@DanyC97
Copy link
Contributor

DanyC97 commented Feb 23, 2018

my 0.02$ @smarterclayton: will be nice to be / keep consistent with all the other templates where this code is at the bottom of the template.

@smarterclayton
Copy link
Contributor Author

smarterclayton commented Feb 23, 2018 via email

@DanyC97
Copy link
Contributor

DanyC97 commented Feb 24, 2018

@smarterclayton at least the other ones form the majority ;). Seriously don't mind which one it is as long as is all agreed so we can go and implement/ have consistency across all code base.

@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton smarterclayton added the lgtm Indicates that a PR is ready to be merged. label Mar 1, 2018
@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 17420, 18254).

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. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants