Skip to content

Commit cc36e1f

Browse files
committed
Fix argo-healthcheck target
If ACM is installed the search for `applications` matches the ACM one and not the argo one.
1 parent b630203 commit cc36e1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,16 @@ validate-prereq: ## verify pre-requisites
193193
.PHONY: argo-healthcheck
194194
argo-healthcheck: ## Checks if all argo applications are synced
195195
@echo "Checking argo applications"
196-
$(eval APPS := $(shell oc get applications -A -o jsonpath='{range .items[*]}{@.metadata.namespace}{","}{@.metadata.name}{"\n"}{end}'))
196+
$(eval APPS := $(shell oc get applications.argoproj.io -A -o jsonpath='{range .items[*]}{@.metadata.namespace}{","}{@.metadata.name}{"\n"}{end}'))
197197
@NOTOK=0; \
198198
for i in $(APPS); do\
199199
n=`echo "$${i}" | cut -f1 -d,`;\
200200
a=`echo "$${i}" | cut -f2 -d,`;\
201-
STATUS=`oc get -n "$${n}" application/"$${a}" -o jsonpath='{.status.sync.status}'`;\
201+
STATUS=`oc get -n "$${n}" applications.argoproj.io/"$${a}" -o jsonpath='{.status.sync.status}'`;\
202202
if [[ $$STATUS != "Synced" ]]; then\
203203
NOTOK=$$(( $${NOTOK} + 1));\
204204
fi;\
205-
HEALTH=`oc get -n "$${n}" application/"$${a}" -o jsonpath='{.status.health.status}'`;\
205+
HEALTH=`oc get -n "$${n}" applications.argoproj.io/"$${a}" -o jsonpath='{.status.health.status}'`;\
206206
if [[ $$HEALTH != "Healthy" ]]; then\
207207
NOTOK=$$(( $${NOTOK} + 1));\
208208
fi;\

0 commit comments

Comments
 (0)