Skip to content

Add OAuth token metrics, AuthFailed condition - #8808

Merged
cert-manager-prow[bot] merged 7 commits into
cert-manager:masterfrom
FelixPhipps:vcert-logic-observability-VC-50658
May 29, 2026
Merged

cert-manager-prow[bot] merged 7 commits into
cert-manager:masterfrom
FelixPhipps:vcert-logic-observability-VC-50658

Conversation

@FelixPhipps

@FelixPhipps FelixPhipps commented May 19, 2026 •

Copy link
Copy Markdown
Member

Implements controller logic and observability for Venafi OAuth token requests (VC-50658).

  • Metrics: two new Prometheus metrics exposed via /metrics:
    • certmanager_venafi_oauth_token_requests_total{status="success|failure"} — counter
    • certmanager_venafi_oauth_token_request_duration_seconds — histogram (buckets: 10ms–30s)
  • Logging: token request success logged at Info, failure at Error in VerifyCredentials.
  • Auth failure condition: when the Venafi endpoint rejects credentials (HTTP 401/403), the Issuer's Ready condition transitions to False with reason: AuthFailed instead of the generic ErrorSetup. This makes it easier to distinguish bad credentials from transient infrastructure problems.

Release Note

Add Venafi OAuth token request observability and a new `AuthFailed` Issuer condition reason to distinguish bad credentials from transient infrastructure errors.

@cert-manager-prow cert-manager-prow Bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. area/monitoring Indicates a PR or issue relates to monitoring area/testing Issues relating to testing needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 19, 2026
@cert-manager-prow

ghost commented May 19, 2026

Copy link
Copy Markdown
Contributor

Hi @FelixPhipps. Thanks for your PR.

I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@cert-manager-prow cert-manager-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 19, 2026
@maelvls

ghost commented May 19, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@cert-manager-prow cert-manager-prow Bot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 19, 2026
@FelixPhipps
FelixPhipps force-pushed the vcert-logic-observability-VC-50658 branch 3 times, most recently from dcc8915 to 4a43dc8 Compare May 20, 2026 13:17
@cert-manager-prow cert-manager-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 21, 2026
Comment thread pkg/issuer/venafi/client/tokencache.go Resolved
@cert-manager-prow cert-manager-prow Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 26, 2026
felix.phipps added 2 commits May 28, 2026 10:38
Signed-off-by: felix.phipps <[email protected]>
@FelixPhipps
FelixPhipps force-pushed the vcert-logic-observability-VC-50658 branch from 93aa7ba to ad72ecc Compare May 28, 2026 09:42
Signed-off-by: felix.phipps <[email protected]>
@FelixPhipps
FelixPhipps force-pushed the vcert-logic-observability-VC-50658 branch from ad72ecc to bbd74cb Compare May 28, 2026 09:59
Signed-off-by: felix.phipps <[email protected]>
@cert-manager-prow cert-manager-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 28, 2026
@inteon
inteon requested a review from Copilot May 28, 2026 13:38
@FelixPhipps
FelixPhipps force-pushed the vcert-logic-observability-VC-50658 branch from 1b80ea5 to c48cde4 Compare May 29, 2026 12:21
@inteon

ghost commented May 29, 2026

Copy link
Copy Markdown
Member

/approve

@cert-manager-prow cert-manager-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 29, 2026
Co-authored-by: Tim Ramlot <[email protected]>
Signed-off-by: Felix Phipps <[email protected]>
@inteon

ghost commented May 29, 2026

Copy link
Copy Markdown
Member

/approve
/lgtm

@cert-manager-prow cert-manager-prow Bot added the lgtm Indicates that a PR is ready to be merged. label May 29, 2026
@cert-manager-prow

ghost commented May 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

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

The pull request process is described here

Details 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

@cert-manager-prow cert-manager-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 29, 2026
@FelixPhipps

ghost commented May 29, 2026

Copy link
Copy Markdown
Member Author

/kind feature

@cert-manager-prow cert-manager-prow Bot added kind/feature Categorizes issue or PR as related to a new feature. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels May 29, 2026
@cert-manager-prow
cert-manager-prow Bot merged commit 77e2f5d into cert-manager:master May 29, 2026
@wallrj-cyberark

ghost commented Jun 18, 2026

Copy link
Copy Markdown
Member

📢 The fix or feature is now available for testing

Please test and report back.

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 Indicates a PR or issue relates to monitoring area/testing Issues relating to testing dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test release-note Denotes a PR that will be considered when it comes time to generate release notes. 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