Introduce an argo-healthcheck make target#345
Introduce an argo-healthcheck make target#345mbaldessari merged 1 commit intovalidatedpatterns:mainfrom
Conversation
7847dc8 to
3d6edce
Compare
This is a simple quick check to see if all argo applications in all
namespaces are synced and error out if they are not.
Synced example:
$ make argo-healthcheck
make -f common/Makefile argo-healthcheck
make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
Checking argo applications
mcg-private-hub acm -> Sync: Synced - Health: Healthy
mcg-private-hub config-demo -> Sync: Synced - Health: Healthy
mcg-private-hub golang-external-secrets -> Sync: Synced - Health: Healthy
mcg-private-hub hello-world -> Sync: Synced - Health: Healthy
mcg-private-hub vault -> Sync: Synced - Health: Healthy
openshift-gitops mcg-private-hub -> Sync: Synced - Health: Healthy
make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
Not synced example:
$ make argo-healthcheck
make -f common/Makefile argo-healthcheck
make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
Checking argo applications
mcg-private-hub acm -> Sync: Synced - Health: Healthy
mcg-private-hub config-demo -> Sync: Synced - Health: Degraded
mcg-private-hub golang-external-secrets -> Sync: Synced - Health: Healthy
mcg-private-hub hello-world -> Sync: Synced - Health: Healthy
mcg-private-hub vault -> Sync: Synced - Health: Progressing
openshift-gitops mcg-private-hub -> Sync: Synced - Health: Healthy
Some applications are not synced or are unhealthy
make[1]: *** [common/Makefile:115: argo-healthcheck] Error 1
make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
make: *** [Makefile:12: argo-healthcheck] Error 2
3d6edce to
dcb9a3e
Compare
|
@mbaldessari - this is a good idea ... iirc, @claudiol is working on better status in the operator too. a combination of both of these things will be good for all the ci's ... just a thought - it'd be neato if when the application is not synced, we get a dump of the output from the application so we can see where its failing/not -syncing |
|
Thanks @day0hero, the stuff that might land in the operator will be async by design, this is more "is everything green now" kind of question. The way I plan to use this is in my deployments scripts to wait for a deployment to be completed with a single comment (.e.g if make argo-healthcheck returns 0 I am good to go). I'd avoid adding any more output mainly because doing it in shell wrapped in Makefile is a terrible thing to do already ;) |
This is a simple quick check to see if all argo applications in all
namespaces are synced and error out if they are not.
Synced example:
Not synced example: