audit: fill in sub-resource

Kubernetes-commit: 019003b9266872f912b188708583141a34561007
This commit is contained in:
Dr. Stefan Schimanski 2017-05-24 10:16:55 +02:00 committed by Kubernetes Publisher
parent f695ec4d4b
commit 8b776edc46
1 changed files with 5 additions and 4 deletions

View File

@ -94,10 +94,11 @@ func NewEventFromRequest(req *http.Request, level auditinternal.Level, attribs a
if attribs.IsResourceRequest() {
ev.ObjectRef = &auditinternal.ObjectReference{
Namespace: attribs.GetNamespace(),
Name: attribs.GetName(),
Resource: attribs.GetResource(),
APIVersion: attribs.GetAPIGroup() + "/" + attribs.GetAPIVersion(),
Namespace: attribs.GetNamespace(),
Name: attribs.GetName(),
Resource: attribs.GetResource(),
Subresource: attribs.GetSubresource(),
APIVersion: attribs.GetAPIGroup() + "/" + attribs.GetAPIVersion(),
}
}