diff --git a/applications/openshift/confinement/security_profiles_operator_exists/rule.yml b/applications/openshift/confinement/security_profiles_operator_exists/rule.yml index f478f20a3ca..9a78fa5509e 100644 --- a/applications/openshift/confinement/security_profiles_operator_exists/rule.yml +++ b/applications/openshift/confinement/security_profiles_operator_exists/rule.yml @@ -20,20 +20,20 @@ ocil_clause: 'the security profiles operator is not installed' ocil: |- To check if the Security Profiles Operator is installed, run the following command: -
oc get sub -nopenshift-security-profiles security-profiles-operator-sub -ojsonpath='{.status.installedCSV}'+
oc get sub -nopenshift-security-profiles security-profiles-operator -ojsonpath='{.status.installedCSV}'the output should return the version of the CSV that represents the installed operator. severity: medium warnings: - general: |- - {{{ openshift_cluster_setting("/apis/operators.coreos.com/v1alpha1/namespaces/openshift-security-profiles/subscriptions/security-profiles-operator-sub") | indent(4) }}} + {{{ openshift_cluster_setting("/apis/operators.coreos.com/v1alpha1/namespaces/openshift-security-profiles/subscriptions/security-profiles-operator") | indent(4) }}} template: name: yamlfile_value vars: ocp_data: 'true' - filepath: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-security-profiles/subscriptions/security-profiles-operator-sub + filepath: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-security-profiles/subscriptions/security-profiles-operator yamlpath: .status.installedCSV values: - value: security-profiles-operator\.v.* diff --git a/applications/openshift/confinement/security_profiles_operator_exists/tests/ocp4/e2e-remediation.sh b/applications/openshift/confinement/security_profiles_operator_exists/tests/ocp4/e2e-remediation.sh index 2745e9d29c4..22bf0d608a0 100755 --- a/applications/openshift/confinement/security_profiles_operator_exists/tests/ocp4/e2e-remediation.sh +++ b/applications/openshift/confinement/security_profiles_operator_exists/tests/ocp4/e2e-remediation.sh @@ -16,6 +16,6 @@ oc wait -n openshift-security-profiles --for=condition=Available --timeout=300s deployment/security-profiles-operator echo "waiting the subscription to have .status.installedCSV" -while [ -z "$(oc get subscription security-profiles-operator-sub -nopenshift-security-profiles -o jsonpath='{.status.installedCSV}')" ]; do +while [ -z "$(oc get subscription security-profiles-operator -nopenshift-security-profiles -o jsonpath='{.status.installedCSV}')" ]; do sleep 3 done diff --git a/ocp-resources/e2e/spo-install.yaml b/ocp-resources/e2e/spo-install.yaml index 701118930e2..b4f9471382a 100644 --- a/ocp-resources/e2e/spo-install.yaml +++ b/ocp-resources/e2e/spo-install.yaml @@ -15,7 +15,7 @@ metadata: apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: - name: security-profiles-operator-sub + name: security-profiles-operator namespace: openshift-security-profiles spec: channel: release-alpha-rhel-8