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

Add metrics for authentication config reload #123793

Conversation

aramase
Copy link
Member

@aramase aramase commented Mar 7, 2024

/kind feature

  • Add metrics for authentication configuration reload.
kube-apiserver: JWT authenticator now report the following metrics:
- apiserver_authentication_config_controller_automatic_reloads_total
- apiserver_authentication_config_controller_automatic_reload_last_timestamp_seconds
[KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-auth/3331-structured-authentication-configuration

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 7, 2024
@aramase
Copy link
Member Author

aramase commented Mar 7, 2024

This PR is built on top of #123525 to add metrics.

/sig auth
/triage accepted
/priority important-soon

@k8s-ci-robot k8s-ci-robot added sig/auth Categorizes an issue or PR as relevant to SIG Auth. triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 7, 2024
@k8s-ci-robot k8s-ci-robot requested review from cheftako and enj March 7, 2024 09:18
@k8s-ci-robot k8s-ci-robot added area/apiserver area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 7, 2024
@aramase aramase force-pushed the aramase/f/authn_config_reload_metrics branch from b691c4f to 349b67a Compare March 7, 2024 09:24
@aramase aramase force-pushed the aramase/f/authn_config_reload_metrics branch 2 times, most recently from 290212a to db98a87 Compare March 7, 2024 20:14
@enj
Copy link
Member

enj commented Mar 7, 2024

/milestone v1.30

@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Mar 7, 2024
@aramase aramase force-pushed the aramase/f/authn_config_reload_metrics branch from db98a87 to b073083 Compare March 8, 2024 23:32
@enj
Copy link
Member

enj commented Mar 9, 2024

@aramase reviewed it here to make the diff easier to see: enj#1 (review)

@aramase aramase force-pushed the aramase/f/authn_config_reload_metrics branch from b073083 to 8a2eaae Compare March 9, 2024 21:30
@liggitt
Copy link
Member

liggitt commented Mar 9, 2024

#123525 is merged

Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

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

I didn't review the test changes, implementation looks functionally correct, just a couple comments for clarity

pkg/kubeapiserver/options/authentication.go Outdated Show resolved Hide resolved
pkg/kubeapiserver/options/authentication.go Outdated Show resolved Hide resolved
pkg/kubeapiserver/options/authentication.go Show resolved Hide resolved
@aramase aramase force-pushed the aramase/f/authn_config_reload_metrics branch from 8a2eaae to 94571d2 Compare March 9, 2024 22:36
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 9, 2024
@aramase
Copy link
Member Author

aramase commented Mar 9, 2024

/assign enj liggitt

@aramase aramase force-pushed the aramase/f/authn_config_reload_metrics branch from 94571d2 to 62ac88b Compare March 9, 2024 22:40
@enj
Copy link
Member

enj commented Mar 9, 2024

/lgtm
/approve

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

LGTM label has been added.

Git tree hash: 07f4806759d17fe531394a96f85c679f718ea70f

@liggitt
Copy link
Member

liggitt commented Mar 9, 2024

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aramase, enj, liggitt

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2024
@k8s-ci-robot k8s-ci-robot merged commit 09093f2 into kubernetes:master Mar 9, 2024
15 checks passed
@aramase aramase deleted the aramase/f/authn_config_reload_metrics branch March 9, 2024 23:59
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/apiserver area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants