move password hash to values.yaml, simplify helm install command

This commit is contained in:
2026-06-14 18:14:55 +07:00
parent 40d7f794aa
commit b6af771fd9
2 changed files with 24 additions and 12 deletions

View File

@@ -45,23 +45,29 @@ helm version
---
## Phase 2 — Set credentials
## Phase 2 — Set ArgoCD admin password
```bash
cp .env.example .env
```
Generate a bcrypt hash of your password and paste it into `.env`:
Install `httpd-tools` (one-time):
```bash
sudo dnf install -y httpd-tools
```
Generate bcrypt hash and paste it into `manifests/argocd/values.yaml` under `configs.secret.argocdServerAdminPassword`:
```bash
htpasswd -nbBC 10 "" YOUR_PASSWORD | tr -d ':\n' | sed 's/$2y/$2a/'
```
Set `ARGOCD_ADMIN_PASSWORD_HASH` in `.env` to the output. This file is gitignored — never commit it.
Commit the updated values:
```bash
git add manifests/argocd/values.yaml && git commit -m "set argocd admin password hash"
```
```bash
git push origin main
```
---
@@ -80,11 +86,7 @@ helm repo update
Install ArgoCD:
```bash
source .env
```
```bash
helm install argocd argo/argo-cd -n argocd --create-namespace -f manifests/argocd/values.yaml --set configs.secret.argocdServerAdminPassword="$ARGOCD_ADMIN_PASSWORD_HASH" --set configs.secret.argocdServerAdminPasswordMtime="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
helm install argocd argo/argo-cd -n argocd --create-namespace -f manifests/argocd/values.yaml
```
Wait for ArgoCD to be ready: