From a07718258aef5cd20a356b4657f1054b6baeb03b Mon Sep 17 00:00:00 2001 From: Han Kang Date: Thu, 13 Oct 2022 13:44:51 -0700 Subject: [PATCH] actually resolve the computations for buckets for static analysis Change-Id: Icafe84e165cc14087a2811f9a3e5d5e69ef3f178 --- .../pkg/authentication/request/x509/x509.go | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/authentication/request/x509/x509.go b/staging/src/k8s.io/apiserver/pkg/authentication/request/x509/x509.go index eeb7c09881e..63010aadc2c 100644 --- a/staging/src/k8s.io/apiserver/pkg/authentication/request/x509/x509.go +++ b/staging/src/k8s.io/apiserver/pkg/authentication/request/x509/x509.go @@ -49,19 +49,19 @@ var clientCertificateExpirationHistogram = metrics.NewHistogram( Help: "Distribution of the remaining lifetime on the certificate used to authenticate a request.", Buckets: []float64{ 0, - (30 * time.Minute).Seconds(), - (1 * time.Hour).Seconds(), - (2 * time.Hour).Seconds(), - (6 * time.Hour).Seconds(), - (12 * time.Hour).Seconds(), - (24 * time.Hour).Seconds(), - (2 * 24 * time.Hour).Seconds(), - (4 * 24 * time.Hour).Seconds(), - (7 * 24 * time.Hour).Seconds(), - (30 * 24 * time.Hour).Seconds(), - (3 * 30 * 24 * time.Hour).Seconds(), - (6 * 30 * 24 * time.Hour).Seconds(), - (12 * 30 * 24 * time.Hour).Seconds(), + 1800, // 30 minutes + 3600, // 1 hour + 7200, // 2 hours + 21600, // 6 hours + 43200, // 12 hours + 86400, // 1 day + 172800, // 2 days + 345600, // 4 days + 604800, // 1 week + 2592000, // 1 month + 7776000, // 3 months + 15552000, // 6 months + 31104000, // 1 year }, StabilityLevel: metrics.ALPHA, },