-
Notifications
You must be signed in to change notification settings - Fork 887
How to automatically create initial user Kubernetes #6417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We do this via the first user flags: 0f3221f |
When & how do you run the |
@mh013370 ah yes sorry we don't use Coder's Helm chart. We've got too many "special" requirements and prefer to have full control over this. One of them being PostStart lifecycle hook that manages the first user creation. |
This makes sense. Perhaps i'll raise a PR to add lifecycle config to the helm chart, since we don't want to maintain our own. I think this is the only way to do it without adding an external resource. Did you have any issues using
source: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/ |
It's be a while where we've had to rely on this to set up a new coder server instance but I don't recall any. The initial headaches was figuring out which environment variables did it and then the project changing to first-login- later. For all I know it may fall over for the next coder server we set up 😄. Things are changing pretty fast with this project. |
@mh013370 Should we mark this as completed? |
Yes i'll close this. Pod lifecycle hooks are sufficient to satisfy the original need. Thanks! |
Question!
When installing Coder in Kubernetes via the Helm chart, what is the preferred way to bootstrap the deployment with an initial user?
I see the initial user API call, but i'm wondering if there's an undocumented standard way of doing this (check for initial user, if not there then create it). I'm trying to avoid manually creating an initial user each time i deploy Coder from scratch.
I don't see a way this can be specified via environment variables via the
coder server
command.The text was updated successfully, but these errors were encountered: