mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 15:50:10 +00:00
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:
commit
2be623b14f
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user