-
Notifications
You must be signed in to change notification settings - Fork 132
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
Rework OSM integration into generic external bootstrap "interface" #1428
Rework OSM integration into generic external bootstrap "interface" #1428
Conversation
Skipping CI for Draft Pull Request. |
Signed-off-by: Marvin Beckers <[email protected]>
Signed-off-by: Marvin Beckers <[email protected]>
Signed-off-by: Marvin Beckers <[email protected]>
29eb2e8
to
18ee0ff
Compare
…isabled Signed-off-by: Marvin Beckers <[email protected]>
Signed-off-by: Marvin Beckers <[email protected]>
/retest |
Signed-off-by: Marvin Beckers <[email protected]>
/retest |
/retest |
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.
Great job @embik, this brings us a lot closer to what we wanted to achieve; remove this circle of dependency between OSM and MC.
/approve 💙
LGTM label has been added. Git tree hash: ba643ae37221b57b859e0c2207a568ba3d48b70e
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmedwaleedmalik, embik The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
…ubermatic#1428) * Deprecate use-osm flag, remove osm dependency Signed-off-by: Marvin Beckers <[email protected]> * Add a note to pkg/bootstrap/types.go Signed-off-by: Marvin Beckers <[email protected]> * Remove provisioning secret as implementation detail of OSM Signed-off-by: Marvin Beckers <[email protected]> * Add legacy label again but also set it if external bootstrapping is disabled Signed-off-by: Marvin Beckers <[email protected]> * Fix linting issues Signed-off-by: Marvin Beckers <[email protected]> * Annotate testdata with default OSPs Signed-off-by: Marvin Beckers <[email protected]> Signed-off-by: Marvin Beckers <[email protected]>
What this PR does / why we need it:
This PR is essentially both proposal and code change in one go. Let me explain the reasoning behind this PR first:
Essentially, we have a consumer/producer relationship between MC (as consumer) and OSM (as producer) when it comes to the user-data passed to new machines. However, I believe the consumer/producer relationship bits are a bit all over the place. Some logic exists in MC, some in OSM. The consumer/producer relationship here is very similar to Go interfaces, and a rule of thumb there is that interfaces should not be aware of types that implement them.
The same, IMHO, goes for the MC-OSM relationship: MC should support a standard (or interface, if you want;
pkg/bootstrap
defines this in this PR) that any producer of bootstrapping user-data can "slot" into. But MC should not be aware of the producer component in any way, other than the defined interface (which, in this PR, is aSecret
created under a certain naming pattern). Theoretically, you should be able to create bootstrapping user-data manually.The point of all this is that MC should not be aware of OSM or depend on it. If this is accepted, I plan to follow up in OSM with adding some of the logic removed here back into it.
In addition, the current MC code does a referential integrity check on an OSP resource - with all the previous explanation this does not make sense anymore anyway (as it's implementation-specific for OSP), but we do not apply referential integrity checks anywhere else for a specific reason: It's against Kubernetes design principles (you won't find this in HPAs referencing a non-existing Deployment, or RBAC role bindings referencing non-existing roles). So, I propose that the check for OSP is removed and replaced with events on
MachineDeployments
, highlighting that the referenced OSP does not (yet) exist. But that is for the follow-up PR in OSM.TL;DR: This PR does the following things:
pkg/bootstrap
that relies on some third-party component (such as OSM) creating a user-data bootstrap secret (following the same pattern that OSM applies right now).Note: The OSP annotation magic should move to KKP, I'll follow up on that as well.
Which issue(s) this PR fixes:
Fixes #
What type of PR is this?
/kind cleanup
Special notes for your reviewer:
Does this PR introduce a user-facing change? Then add your Release Note here:
Documentation: