From 75ec6ed50fa24f9cf3364a5fba819fc791c3446b Mon Sep 17 00:00:00 2001 From: James Slagle Date: Thu, 27 Jun 2024 14:46:32 -0400 Subject: [PATCH] Get just the nmstate operator when waiting for install When waiting for the nmstate operator to be installed, only that operator needs to be returned in the results. As CSV's are visible from all namespaces, restricting by namespace does not have the effect to only show the CSV's from that namespace. This task returns all CSV's in the cluster, regardless of namespace, and fails if more than one CSV is returned as the expected output does not match. This commit adds a filter on the expected label for the nmstate operator so that it will be the only operator returned. Signed-off-by: James Slagle --- roles/ci_nmstate/tasks/nmstate_k8s_install.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/ci_nmstate/tasks/nmstate_k8s_install.yml b/roles/ci_nmstate/tasks/nmstate_k8s_install.yml index e62f2d6949..edfe1411c6 100644 --- a/roles/ci_nmstate/tasks/nmstate_k8s_install.yml +++ b/roles/ci_nmstate/tasks/nmstate_k8s_install.yml @@ -39,6 +39,7 @@ cmd: >- oc get ClusterServiceVersion -n "{{ cifmw_ci_nmstate_namespace }}" + -l operators.coreos.com/kubernetes-nmstate-operator.openshift-nmstate -o jsonpath='{.items[*].status.phase}' changed_when: false register: _nsmate_csv_out