defer metric registration to runtime entry point via constructors

Signed-off-by: Richa Banker <richabanker@google.com>

Kubernetes-commit: 8721c830cf013a92a805b46eb163736f97aba2aa
This commit is contained in:
Richa Banker
2026-05-08 13:37:32 -07:00
committed by Kubernetes Publisher
parent 68262a1cf9
commit 1d2651da7d
6 changed files with 51 additions and 1 deletions

View File

@@ -159,6 +159,7 @@ func (s *sometimes) Do(f func()) {
// GetAuthenticator returns an exec-based plugin for providing client credentials.
func GetAuthenticator(config *api.ExecConfig, cluster *clientauthentication.Cluster) (*Authenticator, error) {
metrics.EnsureRegistered()
return newAuthenticator(globalCache, term.IsTerminal, config, cluster)
}