-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The objectSelector was always running in watch mode regardless of the evaluationInterval. ref: https://issues.redhat.com/browse/ACM-15952 Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
- Loading branch information
1 parent
dc062a0
commit 2fc4924
Showing
4 changed files
with
164 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
test/resources/case42_resource_selector/case42_eval_policy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: case42-selector-eval-e2e | ||
spec: | ||
evaluationInterval: | ||
compliant: watch | ||
noncompliant: watch | ||
remediationAction: inform | ||
object-templates: | ||
- complianceType: musthave | ||
objectSelector: | ||
matchExpressions: | ||
- key: case42 | ||
operator: Exists | ||
objectDefinition: | ||
apiVersion: config-policy-controller.io/v1 | ||
kind: FakeAPI | ||
metadata: | ||
labels: | ||
selected: "true" | ||
namespace: case42-e2e-3 |
11 changes: 11 additions & 0 deletions
11
test/resources/case42_resource_selector/case42_eval_prereq.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: case42-e2e-3 | ||
--- | ||
apiVersion: config-policy-controller.io/v1 | ||
kind: FakeAPI | ||
metadata: | ||
labels: | ||
case42: case42-1-e2e | ||
name: case42-1-e2e |