Skip to content

Commit

Permalink
updated rule to select all namespaces and look for at least one
Browse files Browse the repository at this point in the history
  • Loading branch information
sluetze committed Aug 5, 2024
1 parent 59556e4 commit 5ee5580
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ ocil_clause: "the Kube Descheduler operator is not installed"

ocil: |-
To check if the Kube Descheduler Operator is installed, run the following command:
<pre>oc get sub -n openshift-kube-descheduler-operator cluster-kube-descheduler-operator -ojsonpath='{.status.installedCSV}'</pre>
the output should return the version of the CSV that represents the installed
operator.
<pre>oc get sub --all-namespaces | grep cluster-kube-descheduler-operator</pre>
the output should return at least one entry that represents the installed operator.
warnings:
- general: |-
{{{ openshift_cluster_setting("/apis/operators.coreos.com/v1alpha1/namespaces/openshift-kube-descheduler-operator/subscriptions/cluster-kube-descheduler-operator") | indent(4) }}}
{{{ openshift_cluster_setting("/apis/operators.coreos.com/v1alpha1/subscriptions") | indent(4) }}}
template:
name: yamlfile_value
vars:
ocp_data: "true"
filepath: '/apis/operators.coreos.com/v1alpha1/namespaces/openshift-kube-descheduler-operator/subscriptions/cluster-kube-descheduler-operator'
yamlpath: ".status.installedCSV"
check_existence: "only_one_exists"
filepath: '/apis/operators.coreos.com/v1alpha1/subscriptions'
yamlpath: ".items[:].status.installedCSV"
check_existence: "at_least_one_exists"
values:
- value: "clusterkubedescheduleroperator.*"
operation: "pattern match"
entity_check: "at least one"

0 comments on commit 5ee5580

Please sign in to comment.