Skip to content
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

fix missingSACounter metric #247

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

modulitos
Copy link
Contributor

@modulitos modulitos commented Nov 27, 2024

Issue #, if available:

Description of changes:
Fixes a false-positive case where pod_identity_webhook_missing_sa_count increments when the SA is present, yet missing PI annotations. Since the SA is technically in the cache, the counter shouldn't increment.

We added this metric here: #246
We want this metric to only count cases where pod.spec.serviceAccountName references an SA that is missing in the cache.

(also note that if pod.spec.serviceAccountName references a non-existent SA, PI Webhook will not receive the request because API server will refuse to create the pod)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@modulitos modulitos requested a review from a team as a code owner November 27, 2024 23:35
@modulitos modulitos force-pushed the fix-sa-cache-missed-metric branch from 98d0037 to 2d7664d Compare November 27, 2024 23:56
@modulitos modulitos force-pushed the fix-sa-cache-missed-metric branch from 2d7664d to 2f0cd53 Compare November 28, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant