Skip to content

Commit

Permalink
Fix logging for csv lookup (#107)
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Sundberg <seansund@us.ibm.com>
  • Loading branch information
seansund committed Jun 6, 2023
1 parent fb389da commit 5cbcb4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Installs ArgoCD in the cluster via the operator. On OpenShift the module will also set up a route and
enable OpenShift Auth. On Kubernetes, an ingress will be created.


## Software dependencies

The module depends on the following software components:
Expand Down
4 changes: 2 additions & 2 deletions scripts/check-for-operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ if [[ -z "${CURRENT_CSV}" ]]; then
exit 1
fi

CSV_NAME_PATTERN=$(echo "${CURRENT_CSV}" | sed -E "s/[.]?v?[0-9][.][0-9][.][0-9]//g")
CSV_NAME=$(echo "${CURRENT_CSV}" | sed -E "s/[.]?v?[0-9][.][0-9][.][0-9]//g")

## check for CSV
CSV=$(oc get csv -n "${SUBSCRIPTION_NAMESPACE}" -o json | jq -r --arg NAME "${CSV_NAME_PATTERN}" '.items[] | select(.metadata.name | test($NAME)) | .metadata.name // empty')
CSV=$(oc get csv -n "${SUBSCRIPTION_NAMESPACE}" -o json | jq -r --arg NAME "${CSV_NAME}" '.items[] | select(.metadata.name | test($NAME)) | .metadata.name // empty')

## check for CRD
CRDS=$(oc get crd -o json | jq -r '.items[] | .metadata.name | select(. | test("argocds")) | .')
Expand Down

0 comments on commit 5cbcb4a

Please sign in to comment.