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

Allow to disable NGINX metrics #3512

Merged
merged 1 commit into from
Dec 5, 2018

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Dec 4, 2018

What this PR does / why we need it:

Allow disabling NGINX prometheus metrics

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 4, 2018
@aledbf aledbf force-pushed the disable-metrics branch 2 times, most recently from 44160bb to 8dd7f6a Compare December 4, 2018 20:44
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 4, 2018
@aledbf aledbf force-pushed the disable-metrics branch 2 times, most recently from 67d0efb to 769874f Compare December 5, 2018 12:54
@ElvinEfendi
Copy link
Member

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, ElvinEfendi

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

@@ -16,7 +16,15 @@ limitations under the License.

package metric

import "k8s.io/ingress-nginx/internal/ingress"
import (
Copy link
Member

Choose a reason for hiding this comment

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

things in this file weren't being used anywhere before right?

Copy link
Member Author

Choose a reason for hiding this comment

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

correct

@k8s-ci-robot k8s-ci-robot merged commit 432f534 into kubernetes:master Dec 5, 2018
@aledbf aledbf deleted the disable-metrics branch December 5, 2018 16:26
@@ -821,7 +826,9 @@ stream {

proxy_pass http://upstream_balancer;
log_by_lua_block {
Copy link

Choose a reason for hiding this comment

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

Cloudn't the whole log_by_lua_block be deactivated here?

Copy link
Member

Choose a reason for hiding this comment

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

We could. But it makes customizing Nginx config template harder. For example in my use case we call custom Lua module in log_by_lua phase. If the whole log_by_lua_blok is disabled we would have to change more lines whereas now we just append our custom logic after line 831.

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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants