Skip to content

Commit

Permalink
audit: fill in sub-resource
Browse files Browse the repository at this point in the history
  • Loading branch information
sttts committed May 29, 2017
1 parent 3e9c8aa commit 019003b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions staging/src/k8s.io/apiserver/pkg/audit/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}

Expand Down

0 comments on commit 019003b

Please sign in to comment.