Commit 2be623b1 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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.
parents e2218290 35d926d8
...@@ -304,7 +304,10 @@ func authorizedForPolicy(info user.Info, policy *extensions.PodSecurityPolicy, a ...@@ -304,7 +304,10 @@ func authorizedForPolicy(info user.Info, policy *extensions.PodSecurityPolicy, a
return true return true
} }
attr := buildAttributes(info, policy) 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 return allowed
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment