mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-13 19:28:55 +00:00
fix: exclude user names in configmap not working (#6204)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
8b80fe82d4
commit
48eb79d288
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,11 @@ func (inner AdmissionHandler) withFilter(c config.Configuration) AdmissionHandle
|
|||
if c.ToFilter(request.Kind.Kind, request.Namespace, request.Name) {
|
||||
return nil
|
||||
}
|
||||
for _, username := range c.GetExcludeUsername() {
|
||||
if request.UserInfo.Username == username {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if webhookutils.ExcludeKyvernoResources(request.Kind.Kind) {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue