mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
* 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
29 lines
453 B
Go
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
|
|
}
|