File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,11 @@ LOGS_DIR="/must-gather"
99mkdir -p ${LOGS_DIR}
1010
1111GITOPS_CURRENT_CSV=$( oc get subscription.operators.coreos.com --ignore-not-found -A -o json | jq ' .items[] | select(.metadata.name=="openshift-gitops-operator") | .status.currentCSV' -r)
12- readarray -t NON_ARGO_CRD_NAMES < <( oc get csv --ignore-not-found " $GITOPS_CURRENT_CSV " -o json | jq ' .spec.customresourcedefinitions.owned[] | select(.name | contains("argoproj.io") | not) | .name' -rj)
12+ if [ -z " $GITOPS_CURRENT_CSV " ]; then
13+ NON_ARGO_CRD_NAMES=()
14+ else
15+ readarray -t NON_ARGO_CRD_NAMES < <( oc get csv --ignore-not-found " $GITOPS_CURRENT_CSV " -o json | jq ' .spec.customresourcedefinitions.owned[] | select(.name | contains("argoproj.io") | not) | .name' -rj)
16+ fi
1317
1418# Gathering cluster version all the crd related to operators.coreos.com and argoproj.io
1519echo " gather_gitops:$LINENO ] inspecting crd, clusterversion .." | tee -a ${LOGS_DIR} /gather_gitops.log
You can’t perform that action at this time.
0 commit comments