-
Notifications
You must be signed in to change notification settings - Fork 27
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 passing additional configuration during bootstrap #72
Conversation
Since we're taking this approach, I suppose we can rip the bandaid off and add a Not necessarily in this PR |
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.
Since not every service using microcluster is going to have MicroCloud's neat and tidy automatic join process, we should probably make this config a more general InitConfig
and pass it to all of OnBootstrap
, PreJoin
, and PostJoin
so that when going through the join setup, user specified config can get propagated there as well.
We don't necessarily need to take this approach. It's still up for discussion :) That being said, I do think this is better than the alternative, which (I think) seems to require the client to make two api calls, one to bootstrap the microcluster, and the other to initialise ceph... which kind of defeats the purpose of the hooks. |
Yes. Another thought I had was that in it's current form, this PR does the microcluster bootstrap part before the hook is called. This means that any validation of the config that happens server side will be happening too late. Maybe a |
Unlike with |
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!
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
2bccd29
to
f13f24e
Compare
@masnax I think I've made the changes you've requested. |
f13f24e
to
c2e96b2
Compare
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
c2e96b2
to
51dffd8
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.
Looks good, thanks!
This PR adds an argument to
(*Microcluster).NewCluster
of the formmap[string]string
which is passed into theOnBootstrap
hook. This allows clients to pass additional configuration that might be required at bootstrap.