mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
issue fixed
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
This commit is contained in:
parent
0d1b662134
commit
0054da8cdb
1 changed files with 4 additions and 0 deletions
|
@ -33,6 +33,10 @@ func GetResources(policies []*v1.ClusterPolicy, resourcePaths []string, dClient
|
|||
for _, policy := range policies {
|
||||
for _, rule := range policy.Spec.Rules {
|
||||
for _, kind := range rule.MatchResources.Kinds {
|
||||
if strings.Contains(kind, "/") {
|
||||
lastElement := kind[strings.LastIndex(kind, "/")+1:]
|
||||
resourceTypesMap[lastElement] = true
|
||||
}
|
||||
resourceTypesMap[kind] = true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue