The ClusterPolicy specifies the following rule. If there is any ConfigMap resource in the team-* (regex) namespace, add the label lfx-mentorship: kyverno, if and only if the ConfigMap has no labels described in its metadata.
This is a TestSuite created for the ClusterPolicy for ConfigMaps. The folder also contains kuttl-test.yaml
which helps in setting the testsuite configuration. Setting up the configuration helps us running the tests directly without the testsuite folder :-
kubectl kuttl test
The TestSuite consists of the following testcases:-
- test1(HasNoLabels)
- test2(HasLabels)
- test3(DifferentNameSpace)