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

Use honorLabels instead of labelDrop #6570

Merged
merged 1 commit into from Oct 13, 2021

Conversation

erkanerol
Copy link
Contributor

@erkanerol erkanerol commented Oct 11, 2021

Thanks to labeldrop, we can label metrics belong to
workloads correctly but as a side effect we lose
namespace labels for metrics belong to control plane.
In the past, honorLabels were not recommended by
openshift monitoring team because of security concerns but now
it is recommended.

Signed-off-by: Erkan Erol eerol@redhat.com

Necessary to fix #5383

Release note:

Use honorLabels instead of labelDrop for namespace label on metrics

Thanks to labeldrop, we can label metrics belong to
workloads correctly but as a side effect we lose
namespace labels for metrics belong to control plane.
In the past, honorLabels were not recommended by
monitoring team because of security concerns but now
it is recommended.

Signed-off-by: Erkan Erol <eerol@redhat.com>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XS area/monitoring labels Oct 11, 2021
@rmohr
Copy link
Member

rmohr commented Oct 11, 2021

/lgtm
/approve

Great that we can finally use honorLabels.

/hold

@erkanerol feel free to unhold once verified on your target platforms.
@marceloamaral maybe you can think of a way on how to test this since you added the prometheus operator monitoring stack. Maybe we can add a test which gets run on a dedicated cluster?

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 11, 2021
@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2021
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rmohr

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2021
@erkanerol
Copy link
Contributor Author

erkanerol commented Oct 11, 2021

@simonpasquier Could you please confirm that honorLabels is safe to use?

@erkanerol
Copy link
Contributor Author

/unhold

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 12, 2021
@erkanerol
Copy link
Contributor Author

Note that this PR will fix missing namespace labels on "up" metrics but there is another issue as stated in #5383

The other problem is here that the expr checks whether the result is zero or not. When the result is empty, it is false and the alert is not triggered. -> We need to fix this as well. I will open another PR to fix alert rules for stale data. Fortunately, we have a unit test infra for that part. It will be verified with automated tests.

@simonpasquier
Copy link

yes I think that it's reasonable to use honor_labels here.

@erkanerol
Copy link
Contributor Author

/retest-required

@kubevirt-commenter-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@kubevirt-commenter-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot kubevirt-bot merged commit a92b60b into kubevirt:main Oct 13, 2021
erkanerol pushed a commit to erkanerol/kubevirt that referenced this pull request Oct 27, 2021
Manual cherry-picks
- kubevirt#6570
- kubevirt#6588
- kubevirt#6652

Signed-off-by: Erkan Erol <eerol@redhat.com>
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. area/monitoring dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alert "VirtAPIDown" doesn't work
5 participants