AthenZ / k8s-athenz-sia

Apache License 2.0
1 stars 7 forks source link

token metrics with k8s namespace and k8s pod name #103

Closed mlajkim closed 5 months ago

mlajkim commented 5 months ago

Background

token metrics now includes k8s_namespace and k8s_pod_name if the following env exists

sample:

curl -sfS localhost:9793/metrics | grep token | grep token_expires_in_seconds
# HELP token_expires_in_seconds Indicates remaining time until the token expires
# TYPE token_expires_in_seconds gauge
token_expires_in_seconds{domain="athenz.provider-domain",k8s_namespace="my-namespace",k8s_pod="test-pod-1a2cb7",max_expiry="14400",role="provider-client",type="accesstoken"} 12792.730765255
token_expires_in_seconds{domain="athenz.provider-domain",k8s_namespace="my-namespace",k8s_pod="test-pod-1a2cb7",min_expiry="14400",role="provider-client",type="roletoken"} 12792.730655096

TODOs