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

Fix metrics issues #774

Merged
merged 6 commits into from
Jan 18, 2024
Merged

Conversation

clyang82
Copy link
Contributor

  1. We need to start the metrics server no matter who is leader or not, because without metrics server, the pod will be shown as "Down" by prometheus when it scrapes the pod. refer to Serve metrics for non-leader pods kubernetes-sigs/controller-runtime#196
  2. Avoid using init, because you cannot control it. for our case, we init the metrics before register to prometheus
  3. introduce an annotation gh-metrics-scrape-interval allow resetting the interval. the default value is 12h. fixed: https://issues.redhat.com/browse/ACM-9125

Signed-off-by: clyang82 <chuyang@redhat.com>
Signed-off-by: clyang82 <chuyang@redhat.com>
Signed-off-by: clyang82 <chuyang@redhat.com>
Signed-off-by: clyang82 <chuyang@redhat.com>
Signed-off-by: clyang82 <chuyang@redhat.com>
Signed-off-by: clyang82 <chuyang@redhat.com>
@clyang82
Copy link
Contributor Author

/test test-unit

1 similar comment
@clyang82
Copy link
Contributor Author

/test test-unit

@clyang82
Copy link
Contributor Author

/test sonarcloud

@clyang82
Copy link
Contributor Author

/retest

Copy link

sonarcloud bot commented Jan 18, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

64.3% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@clyang82
Copy link
Contributor Author

clyang82 commented Jan 18, 2024

/override "ci/prow/sonarcloud"

Copy link

openshift-ci bot commented Jan 18, 2024

@clyang82: /override requires failed status contexts to operate on, but none was given

In response to this:

/override

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@clyang82
Copy link
Contributor Author

/override "ci/prow/sonarcloud"

Copy link

openshift-ci bot commented Jan 18, 2024

@clyang82: Overrode contexts on behalf of clyang82: ci/prow/sonarcloud

In response to this:

/override "ci/prow/sonarcloud"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@yanmxa
Copy link
Member

yanmxa commented Jan 18, 2024

/lgtm

Copy link

openshift-ci bot commented Jan 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clyang82, yanmxa

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

@clyang82
Copy link
Contributor Author

/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Jan 18, 2024

@clyang82: Overrode contexts on behalf of clyang82: SonarCloud Code Analysis

In response to this:

/override "SonarCloud Code Analysis"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-merge-bot openshift-merge-bot bot merged commit c306bf3 into stolostron:main Jan 18, 2024
8 of 9 checks passed
@clyang82 clyang82 deleted the fix_metrics branch January 18, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants