Merge pull request #38805 from xilabao/add-err-info-to-authorize-in-psp

Automatic merge from submit-queue

add err info to authorize in psp

It's unwise to ignore the err in my view.
This commit is contained in:
Kubernetes Submit Queue 2017-03-10 13:32:19 -08:00 committed by GitHub
commit 2be623b14f

View File

@ -304,7 +304,10 @@ func authorizedForPolicy(info user.Info, policy *extensions.PodSecurityPolicy, a
return true
}
attr := buildAttributes(info, policy)
allowed, _, _ := authz.Authorize(attr)
allowed, reason, err := authz.Authorize(attr)
if err != nil {
glog.V(5).Infof("cannot authorized for policy: %v,%v", reason, err)
}
return allowed
}