You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(bootstrapper): add idempotent operations for secrets and organizations (#338)
## 📝 Description
This change ensures idempotency when bootstrapping installations,
allowing gen-secrets and init-org to be run multiple times safely.
Root Users credentials are now keps in authentication secret, because
this one is not managed by the helm chart and is preserved between
cluster restarts.
- Use CreateSecretIfNotExists instead of UpsertSecret for all secret
generation
- Ensure secrets aren't overwritten when they already exist
- Add Describe method to OrgClient to check if an organization exists
- Add OrganizationExists function to verify existing organizations
- Modify CreateSemaphoreOrganization to use existing orgs when available
- Update init-org command to skip creation if organization already
exists
- Add corresponding unit tests for both secret and organization
functionality
New way of extracting Root User credentials
```bash
echo "Email: $(kubectl get secret semaphore-authentication -n default -o jsonpath='{.data.ROOT_USER_EMAIL}' | base64 -d)"; echo "Password: $(kubectl get secret semaphore-authentication -n default -o jsonpath='{.data.ROOT_USER_PASSWORD}' | base64 -d)"; echo "API Token: $(kubectl get secret semaphore-authentication -n default -o jsonpath='{.data.ROOT_USER_TOKEN}' | base64 -d)"
```
## ✅ Checklist
- [x] I have tested this change
- [x] This change requires documentation update
0 commit comments