1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/pkg/resourcecache/utils.go
Mohan B E 51ac382c6c
Feature/configmaps var 724 (#1118)
* added configmap data substitution for foreground mutate and validate

* added configmap data substitution for foreground mutate and validate fmt

* added configmap lookup for background

* added comments to resource cache

* added configmap data lookup in preConditions

* added parse strings in In operator and configmap lookup docs

* added configmap lookup docs

* modified configmap lookup docs
2020-09-22 14:11:49 -07:00

29 lines
453 B
Go

package resourcecache
func (resc *ResourceCache) matchGVRKey(key string) bool {
if len(resc.match) == 0 {
return true
}
ok := false
for _, mkey := range resc.match {
if key == mkey {
ok = true
break
}
}
return ok
}
func (resc *ResourceCache) excludeGVRKey(key string) bool {
if len(resc.exclude) == 0 {
return false
}
ok := true
for _, ekey := range resc.exclude {
if key == ekey {
ok = false
break
}
}
return ok
}