-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adds new metric kube_pod_service_account
#2096
feat: Adds new metric kube_pod_service_account
#2096
Conversation
|
Welcome @swarup-stripe! |
kube_pod_service_account
kube_pod_service_account
@@ -334,6 +336,7 @@ kube_pod_info{namespace="default",pod="pod0",uid="abc-0",host_ip="1.1.1.1",pod_i | |||
kube_pod_labels{namespace="default",pod="pod0",uid="abc-0"} 1 | |||
kube_pod_owner{namespace="default",pod="pod0",uid="abc-0",owner_kind="",owner_name="",owner_is_controller=""} 1 | |||
kube_pod_restart_policy{namespace="default",pod="pod0",uid="abc-0",type="Always"} 1 | |||
kube_pod_service_account{namespace="default",pod="pod0",uid="abc-0",service_account=""} 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QQ: can this metric kube_pod_service_account be used in alerts? Or only informational purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CatherineF-dev my use case is to have this for for informational purposes so our users can query metrics by their service account. All pods have the service account in the podspec according to the docs so I think it could be used for alerts. However if it's a question about cardinality, I'm not too sure.
/triage accepted |
@CatherineF-dev wanted to follow-up and see if we can get this PR merged |
/lgtm |
/assign @fpetkovski |
@fpetkovski Bumping this - it's a pretty small change and would be really useful for our use-case! Happy to clarify if necessary |
/lgtm Thanks for your contribution! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CatherineF-dev, mrueg, swarup-stripe The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
It adds a new pod metric
kube_pod_service_account
to expose the service account (p.Spec.ServiceAccountName
) for a particular pod. This is needed to see which user has created a pod and view metrics for pods created by a particular user.How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
Increases