-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter out unrelated subscription resolution failures
Since OLM includes a subscription error on all subscriptions in the namespace, even if that subscription itself is unaffected, operator policy needs to know if the error is related to the subscription. This adds some regex filtering to parse the messages since the message format is consistent. Relates: https://issues.redhat.com/browse/ACM-10195 Signed-off-by: mprahl <mprahl@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
244 additions
and
11 deletions.
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
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
23 changes: 23 additions & 0 deletions
23
test/resources/case38_operator_install/operator-policy-no-exist-enforce.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,23 @@ | ||
apiVersion: policy.open-cluster-management.io/v1beta1 | ||
kind: OperatorPolicy | ||
metadata: | ||
name: oppol-no-exist-enforce | ||
annotations: | ||
policy.open-cluster-management.io/parent-policy-compliance-db-id: "124" | ||
policy.open-cluster-management.io/policy-compliance-db-id: "64" | ||
ownerReferences: | ||
- apiVersion: policy.open-cluster-management.io/v1 | ||
kind: Policy | ||
name: parent-policy | ||
uid: 12345678-90ab-cdef-1234-567890abcdef # must be replaced before creation | ||
spec: | ||
remediationAction: enforce | ||
severity: medium | ||
complianceType: musthave | ||
subscription: | ||
channel: stable-3.8 | ||
name: project-quay-does-not-exist | ||
namespace: operator-policy-testns | ||
installPlanApproval: Automatic | ||
source: operatorhubio-catalog | ||
sourceNamespace: olm |