certman-operator icon indicating copy to clipboard operation
certman-operator copied to clipboard

[DRAFT] Removing decomissioned certificates from the metrics

Open anispate opened this issue 1 year ago • 3 comments

As part of the bug OSD-14653, we will be trying to delete the decom certs from the UpdateCertValidDuration metrics.

Currently, as shown in this link (https://grafana.app-sre.devshift.net/explore?schemaVersion=1&panes=%7B%22x7t%22:%7B%22datasource%22:%22P3D303D298AFF784A%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22certman_operator_certificate_valid_duration_days%20%3C%2045%22,%22range%22:true,%22instant%22:true,%22datasource%22:%7B%22type%22:%22prometheus%22,%22uid%22:%22P3D303D298AFF784A%22%7D,%22editorMode%22:%22code%22,%22legendFormat%22:%22__auto%22,%22useBackend%22:false,%22disableTextWrap%22:false,%22fullMetaSearch%22:false,%22includeNullMetadata%22:true%7D%5D,%22range%22:%7B%22from%22:%22now-1h%22,%22to%22:%22now%22%7D%7D%7D&orgId=1) it is showing us all the certificates which are decommissioned

anispate avatar Sep 23 '24 16:09 anispate

Codecov Report

Attention: Patch coverage is 52.17391% with 11 lines in your changes missing coverage. Please review.

Project coverage is 48.76%. Comparing base (3ce30e2) to head (ae257eb). Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
pkg/localmetrics/localmetrics.go 66.66% 3 Missing and 2 partials :warning:
...ertificaterequest/certificaterequest_controller.go 0.00% 4 Missing :warning:
controllers/certificaterequest/update_status.go 50.00% 2 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #296      +/-   ##
==========================================
+ Coverage   48.56%   48.76%   +0.19%     
==========================================
  Files          28       28              
  Lines        2096     2098       +2     
==========================================
+ Hits         1018     1023       +5     
+ Misses        971      967       -4     
- Partials      107      108       +1     
Files with missing lines Coverage Δ
controllers/certificaterequest/update_status.go 32.75% <50.00%> (+1.17%) :arrow_up:
...ertificaterequest/certificaterequest_controller.go 35.71% <0.00%> (+0.21%) :arrow_up:
pkg/localmetrics/localmetrics.go 55.00% <66.66%> (+3.07%) :arrow_up:

codecov[bot] avatar Sep 23 '24 16:09 codecov[bot]

/retest

anispate avatar Oct 01 '24 13:10 anispate

@anispate: all tests passed!

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Oct 31 '24 17:10 openshift-ci[bot]

/lgtm

Tested by the team

clcollins avatar Oct 31 '24 18:10 clcollins

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anispate, clcollins

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

openshift-ci[bot] avatar Oct 31 '24 18:10 openshift-ci[bot]