fix(actions): create admin password during argocd install to login with
Some checks failed
/ validate (push) Failing after 1m59s
Some checks failed
/ validate (push) Failing after 1m59s
This commit is contained in:
parent
83c5ceda96
commit
9715b21f69
1 changed files with 12 additions and 11 deletions
|
|
@ -40,9 +40,18 @@ jobs:
|
||||||
-n argocd
|
-n argocd
|
||||||
kubectl wait --for=condition=available --timeout=60s \
|
kubectl wait --for=condition=available --timeout=60s \
|
||||||
deployment/sealed-secrets-controller -n kube-system
|
deployment/sealed-secrets-controller -n kube-system
|
||||||
until kubectl get secret argocd-initial-admin-secret -n argocd 2>/dev/null; do
|
kubectl -n argocd patch secret argocd-secret -p \
|
||||||
echo "Waiting for argocd-initial-admin-secret..."; sleep 3
|
'{"stringData": {"admin.password": "$2a$10$rRyBsGSHK6.uc8fntPwVIuV8td2RMkiY1oiCQGiFLLsZjaGEPTnXK", "admin.passwordMtime": "2024-01-01T00:00:00Z"}}'
|
||||||
done
|
kubectl rollout restart deployment/argocd-server -n argocd
|
||||||
|
kubectl rollout status deployment/argocd-server -n argocd --timeout=60s
|
||||||
|
|
||||||
|
- name: Login to ArgoCD
|
||||||
|
run: |
|
||||||
|
argocd login argocd-server.argocd.svc.cluster.local \
|
||||||
|
--plaintext \
|
||||||
|
--grpc-web \
|
||||||
|
--username admin \
|
||||||
|
--password argocd-ci
|
||||||
|
|
||||||
- name: Import SealedSecrets key
|
- name: Import SealedSecrets key
|
||||||
env:
|
env:
|
||||||
|
|
@ -56,14 +65,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
kubectl apply -f apps/
|
kubectl apply -f apps/
|
||||||
|
|
||||||
- name: Login to ArgoCD
|
|
||||||
run: |
|
|
||||||
argocd login argocd-server.argocd.svc.cluster.local \
|
|
||||||
--plaintext \
|
|
||||||
--grpc-web \
|
|
||||||
--username admin \
|
|
||||||
--password $(kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d)
|
|
||||||
|
|
||||||
- name: Wait for ArgoCD sync
|
- name: Wait for ArgoCD sync
|
||||||
run: |
|
run: |
|
||||||
APPS=$(argocd app list -o name)
|
APPS=$(argocd app list -o name)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue