-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
More useful audit error logs #111706
More useful audit error logs #111706
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tallclair 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 |
/assign @deads2k |
/triage accepted |
/sig instrumentation |
What type of PR is this?
/kind bug
What this PR does / why we need it:
auditID
with audit error logs in the kube-apiserver logs, so errors can be correlated with the request. (As an asside, I think we should do this for all apiserver log lines in the request serving path, but that's outside the scope of this PR)While debugging a kube-apiserver, I came across a lot of log lines like this:
Note the double space after the first
of
. This is logged fromkubernetes/staging/src/k8s.io/apiserver/pkg/audit/request.go
Line 169 in eefcf6a
But
reflect.TypeOf(obj).Name()
is returning the empty string (from the docs: "Name returns the type's name within its package for a defined type. For other (non-defined) types it returns the empty string.")Note to reviewers:
The underlying issue generating these log lines was fixed by #110110
Does this PR introduce a user-facing change?
/sig api-machinery