mirror of https://github.com/k3s-io/k3s
Merge pull request #60190 from hzxuzhonghu/audit-cleanup
Automatic merge from submit-queue (batch tested with PRs 59286, 59743, 59883, 60190, 60165). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. audit/request.go remove inaccurate TODO and fix typo **What this PR does / why we need it**: remove one inaccurate `TODO` and fix a typo **Release note**: ```release-note NONE ```pull/6/head
commit
43a488f1e5
|
@ -127,7 +127,6 @@ func LogRequestObject(ae *auditinternal.Event, obj runtime.Object, gvr schema.Gr
|
|||
ae.ObjectRef.ResourceVersion = meta.GetResourceVersion()
|
||||
}
|
||||
}
|
||||
// TODO: ObjectRef should include the API group.
|
||||
if len(ae.ObjectRef.APIVersion) == 0 {
|
||||
ae.ObjectRef.APIGroup = gvr.Group
|
||||
ae.ObjectRef.APIVersion = gvr.Version
|
||||
|
@ -153,7 +152,7 @@ func LogRequestObject(ae *auditinternal.Event, obj runtime.Object, gvr schema.Gr
|
|||
}
|
||||
}
|
||||
|
||||
// LogRquestPatch fills in the given patch as the request object into an audit event.
|
||||
// LogRequestPatch fills in the given patch as the request object into an audit event.
|
||||
func LogRequestPatch(ae *auditinternal.Event, patch []byte) {
|
||||
if ae == nil || ae.Level.Less(auditinternal.LevelRequest) {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue