dag-andersen / argocd-diff-preview

Tool for rendering manifest changes on pull requests.
Apache License 2.0
156 stars 10 forks source link

error: Error from server (NotFound): secrets "argocd-initial-admin-secret" not found #32

Closed dag-andersen closed 3 months ago

dag-andersen commented 3 months ago

Sometimes argocd-diff-preview fails with: error: Error from server (NotFound): secrets "argocd-initial-admin-secret" not found

Debug mode enabled:

[2024-07-04T14:02:45Z INFO  argocd_diff_preview] ✨ Running with:
[2024-07-04T14:02:45Z INFO  argocd_diff_preview] ✨ - local-cluster-tool: Kind
[2024-07-04T14:02:45Z INFO  argocd_diff_preview] ✨ - base-branch: main
[2024-07-04T14:02:45Z INFO  argocd_diff_preview] ✨ - target-branch: main
[2024-07-04T14:02:45Z INFO  argocd_diff_preview] ✨ - secrets-folder: ./secrets
[2024-07-04T14:02:45Z INFO  argocd_diff_preview] ✨ - output-folder: ./output
[2024-07-04T14:02:45Z INFO  argocd_diff_preview] ✨ - repo: org/repo
[2024-07-04T14:02:45Z INFO  argocd_diff_preview] ✨ - timeout: 30 seconds
[2024-07-04T14:02:45Z INFO  argocd_diff_preview::kind] 🚀 Creating cluster...
[2024-07-04T14:03:14Z INFO  argocd_diff_preview::kind] 🚀 Cluster created successfully
[2024-07-04T14:03:14Z INFO  argocd_diff_preview::argocd] 🦑 Installing Argo CD...
[2024-07-04T14:03:18Z INFO  argocd_diff_preview::argocd] 🦑 Waiting for Argo CD to start...
[2024-07-04T14:03:51Z INFO  argocd_diff_preview::argocd] 🦑 Logging in to Argo CD through CLI...
[2024-07-04T14:03:51Z DEBUG argocd_diff_preview::argocd] Port-forwarding Argo CD server...
[2024-07-04T14:03:51Z DEBUG argocd_diff_preview::argocd] Getting initial admin password...
[2024-07-04T14:03:51Z DEBUG argocd_diff_preview::argocd] Running command: kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath={.data.password}
[2024-07-04T14:03:51Z ERROR argocd_diff_preview::argocd] ❌ Failed to get secret argocd-initial-admin-secret
thread 'main' panicked at src/argocd.rs:124:13:
error: Error from server (NotFound): secrets "argocd-initial-admin-secret" not found

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Rerunning the argocd-diff-preview usually solves the problem.

Please give a thumbs up 👍🏻 on this issue if you have experienced the same problem.

dag-andersen commented 3 months ago

Hopefully this is fixed in v0.0.11 (PR). Give this comment a 😕 reaction, if you still experience this issue on v0.0.11.

dag-andersen commented 3 months ago

Closing Issue. Comment on the issue if you still experience it :)