From a9231d7b2a8475c5bebccd46774041ed67a7ba1c Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Mon, 19 Aug 2024 14:43:41 -0500 Subject: [PATCH 1/3] Fix manual remediation for SPO rule We have a manual remediation for installing SPO, but it was failing in our e2e suite with the following error: fork/exec /go/src/github.com/ComplianceAsCode/content/applications/openshift/confinement/security_profiles_operator_exists/tests/ocp4/e2e-remediation.sh: permission denied This commit updates the script so that it's executable and doesn't fail when applied. --- .../tests/ocp4/e2e-remediation.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 applications/openshift/confinement/security_profiles_operator_exists/tests/ocp4/e2e-remediation.sh 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 old mode 100644 new mode 100755 From 72743aa58b3c01d7a000a8027b3b01e9c477593d Mon Sep 17 00:00:00 2001 From: Watson Sato Date: Wed, 21 Aug 2024 09:01:38 +0200 Subject: [PATCH 2/3] Fix spo-install metadata indentation --- ocp-resources/e2e/spo-install.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ocp-resources/e2e/spo-install.yaml b/ocp-resources/e2e/spo-install.yaml index 774e2fbad2b..701118930e2 100644 --- a/ocp-resources/e2e/spo-install.yaml +++ b/ocp-resources/e2e/spo-install.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: Namespace metadata: - name: openshift-security-profiles -labels: - openshift.io/cluster-monitoring: "true" + name: openshift-security-profiles + labels: + openshift.io/cluster-monitoring: "true" --- apiVersion: operators.coreos.com/v1 kind: OperatorGroup From 7d1a1c7d67f2f6e3d60dd8e4cc324b555aa48384 Mon Sep 17 00:00:00 2001 From: Watson Sato Date: Wed, 21 Aug 2024 15:43:37 +0200 Subject: [PATCH 3/3] Fix remediation subscription name --- .../tests/ocp4/e2e-remediation.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 22bf0d608a0..2745e9d29c4 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 -nopenshift-security-profiles -o jsonpath='{.status.installedCSV}')" ]; do +while [ -z "$(oc get subscription security-profiles-operator-sub -nopenshift-security-profiles -o jsonpath='{.status.installedCSV}')" ]; do sleep 3 done