-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Allow Operator Generated bootstrap token #12520
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lhaig! This is a great first pass. Most of the implementation looks pretty good, but I've left some comments about the API.
There's currently a failing test you'll want to fix when you go thru and add tests, and make sure you add documentation to the bootstrap command docs
Hi @tgross, Currently the client sets a header in the request Perhaps I need to add something for when we are using the API? |
Make it more clear that the root token is based on the JSON above.
Co-authored-by: Michael Schurter <[email protected]>
// Since we're not actually writing this HTTP request, we have | ||
// to manually set ContentLength | ||
req.ContentLength = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow this took me a while to figure out: since we're never actually writing this HTTP request, the stdlib code that sets ContentLength is never set!
Therefore in tests we need to set ContentLength to some nonzero value since tests do not use a real HTTP server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am glad it is finally solved it kept me up a few nights :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Sorry our test harness breaks the ContentLength check! What a hassle.
I'm not sure why the lint tests are failing. They pass for me locally. Maybe someone else on the team will have an idea.
Update: Fixed lint tests! I think I just needed to upgrade hclfmt.
a55d261
to
9ca6c63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Kudos for sticking this one out @lhaig! Reviews for a big feature can sometimes be a good bit of work but Nomad is going to be that much better for this PR. Thanks!
Co-authored-by: Lance Haig <[email protected]>
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR provides an operator the ability to provide a generated management token which is then used to bootstrap the cluster ACLs.
TODO: