Skip to content

Instantly share code, notes, and snippets.

@riccardomc
Created July 7, 2020 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riccardomc/8c574d982558476a7aee4fa52b24dc68 to your computer and use it in GitHub Desktop.
Save riccardomc/8c574d982558476a7aee4fa52b24dc68 to your computer and use it in GitHub Desktop.
do things in argo without browser
# FIXME: argocd-server default password is the podname, should we use proper secrets?
ARGOCD_PASSWORD=$(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2)
# How many seconds to wait for cluster services to be up before giving up. 600s = 10mins.
ARGOCD_TIMEOUT=600
# login to argocd server using port forward
argocd login \
--insecure \
--port-forward \
--port-forward-namespace argocd \
--loglevel debug \
--username admin \
--password "$ARGOCD_PASSWORD"
# wait for sync
argocd app \
--insecure \
--port-forward \
--port-forward-namespace argocd \
--loglevel debug \
wait --sync --timeout $ARGOCD_TIMEOUT cluster-services
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment