Confusing namespace
label in SSL metrcis
#11191
Labels
needs-kind
Indicates a PR lacks a `kind/foo` label and requires one.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
triage/needs-information
Indicates an issue needs more information in order to work on it.
What happened:
nginx_ingress_controller_ssl_certificate_info
andnginx_ingress_controller_ssl_expire_time_seconds
are two ssl related metrics. For example, I have a tls secretgateway-perf-resource/wildcard-tls
and ingress-nginx is deployed ingateway-perf
Both metrics aim to same secret. But
namespace
label innginx_ingress_controller_ssl_certificate_info
, it is the namespace of tls secret itself. Because it is overwrited byingress-nginx/internal/ingress/metric/collectors/controller.go
Lines 314 to 327 in df9d0e1
namespace
label innginx_ingress_controller_ssl_expire_time_seconds
, it is the namespace of ingress-nginx-controller which is populated byingress-nginx/internal/ingress/metric/collectors/controller.go
Lines 71 to 75 in df9d0e1
What you expected to happen:
namepace
should has same meaning in those two metrics.controller_namespace
if neededNGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
Not releated, looks like nothing change in those metrics part
Kubernetes version (use
kubectl version
):1.19.12
Environment:
Not related
How to reproduce this issue:
Any tls secret has different namespace with ingress-nginx-controller itself. e.g.
namespace-a
namespace-b
--default-ssl-certificate=namespace-b/some-secret
curl <ip>:10254/metrics | grep ssl
to get the metricsAnything else we need to know:
N/A
The text was updated successfully, but these errors were encountered: