Metrics: Fix namespace in nginx_ingress_controller_ssl_expire_time_seconds. (#11985)

Co-authored-by: Aleksey Gavrilov <alexey.gavrilov@flant.com>
This commit is contained in:
k8s-infra-cherrypick-robot 2024-09-17 13:40:43 -07:00 committed by GitHub
parent cb182e8595
commit ff9275bc15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -305,6 +305,7 @@ func (cm *Controller) SetSSLExpireTime(servers []*ingress.Server) {
}
labels["host"] = s.Hostname
labels["secret_name"] = s.SSLCert.Name
labels["namespace"] = s.SSLCert.Namespace
labels["identifier"] = s.SSLCert.Identifier()
cm.sslExpireTime.With(labels).Set(float64(s.SSLCert.ExpireTime.Unix()))