supporting wildcards in resource namespace matching
Explanation
In a cluster policy, we list all resources in the namespace correctly, but when we attempt to match the desired resource namespace against the actual resource namespace - we do not consider wildcards . In the kyverno policy match clause namespaces can have * or ? wildcards. This PR adds code to do that match iff wildcards are present.
Related issue
Closes #14212
Milestone of this PR
Documentation (required for features)
My PR contains new or altered behavior to Kyverno.
-
I have sent the draft PR to add or update the documentation and the link is:
What type of PR is this
/kind bug
Proposed Changes
Proof Manifests
Checklist
-
I have read the contributing guidelines. -
I have read the PR documentation guide and followed the process including adding proof manifests to this PR. -
This is a bug fix and I have added unit tests that prove my fix is effective. -
This is a feature and I have added CLI tests that are applicable. -
My PR needs to be cherry picked to a specific release branch which is . -
My PR contains new or altered behavior to Kyverno and -
CLI support should be added and my PR doesn't contain that functionality.
-