From d08d2a14030b15ddfc6f4d914eda5781aaf8d6e7 Mon Sep 17 00:00:00 2001 From: dena <91744937+deer-wmde@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:05:12 +0200 Subject: [PATCH] (argo) add makefile targets (#1689) --- Makefile | 28 ++++++++++++++++++++++++++++ bin/argocli | 4 ++++ doc/deployments/argocd.md | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 bin/argocli diff --git a/Makefile b/Makefile index f8189b17a..eb0b2bc3a 100644 --- a/Makefile +++ b/Makefile @@ -112,3 +112,31 @@ skaffold-%: skaffold-run: # @HELP Run all local modules using skaffold skaffold-run: cd ./skaffold && skaffold run --kube-context minikube-wbaas + +.PHONY: argo-reset-password +argo-reset-password: # @HELP Reset the admin password for the ArgoCD of the current context +argo-reset-password: + ./bin/reset-argocd-password + +argo-sync-app-of-apps: +argo-sync-ui: # @HELP Sync ui in ArgoCD +.PHONY: argo-sync-% +argo-sync-%: # @HELP Sync any Application defined in ArgoCD +argo-sync-%: APP=$* +argo-sync-%: + ./bin/argocli app sync $(APP) + +.PHONY: argo-sync +argo-sync: # @HELP Sync app-of-apps in ArgoCD (which contains all other Applications) +argo-sync: argo-sync-app-of-apps + +.PHONY: argo-list +argo-list: # @HELP List current applications and their state in ArgoCD +argo-list: + ./bin/argocli app list + +.PHONY: argo-port-forward +argo-port-forward: # @HELP Port forwards the ArgoCD UI to localhost:8080 +argo-port-forward: + kubectl -n argocd port-forward deployments/argo-cd-base-argocd-server 8080 + diff --git a/bin/argocli b/bin/argocli new file mode 100755 index 000000000..f624be843 --- /dev/null +++ b/bin/argocli @@ -0,0 +1,4 @@ +#!/bin/bash + +kubectl -n argocd exec statefulsets/argo-cd-base-argocd-application-controller -- argocd --core $* + diff --git a/doc/deployments/argocd.md b/doc/deployments/argocd.md index e336a3eaa..98ed8c684 100755 --- a/doc/deployments/argocd.md +++ b/doc/deployments/argocd.md @@ -57,5 +57,5 @@ This GitHub workflow runs the script to check if the checked-in values files are - Forward port `8080` of the deployment `argo-cd-base-argocd-server` ``` - kubectl -n argocd port-forward deployments/argo-cd-base-argocd-server 8080` + make argo-port-forward ``` \ No newline at end of file