Adding New Local User for ArgoCD
Preface
A simple hack to create new local ArgoCD user on OCP4 Cluster.
Prerequisite
- You have access to the OCP Cluster;
- You have access to the ArgoCD Namespace inside that cluster with write permissions.
Procedure
Create User
- Connect to the Cluster (either via OCP Client CLI or OCP Console), move into the ArgoCD Project.
- Edit the
argocd-cm
configMap. In data, add new key-value pair:accounts.<user-name>: 'apiKey, login'
; - Save/apply your edit;
- Restart the deployment rollout.
Create Password for the user
- Hash your password using 10-factor Bcrypt hash (just google for one) and copy your hashed password;
- In the secret named
argocd-secret
in the ArgoCD namespace, add new key-value pair: `accounts..password: <your-hashed-password’; - Save/apply your edit;
- Restart the deployment rollout.
Conclusion
You should be able to use the user you just create to access the ArgoCD web UI.