-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Automatically set kubelet args for capd #8881
🌱 Automatically set kubelet args for capd #8881
Conversation
/hold |
Part of #8788 |
@fabriziopandini I think this is an old version of the kind mapper PR. Did you maybe lose a commit during rebase? |
aa6e0b4
to
fb9055b
Compare
test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go
Show resolved
Hide resolved
test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go
Show resolved
Hide resolved
test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go
Show resolved
Hide resolved
test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go
Show resolved
Hide resolved
fb9055b
to
61433ec
Compare
/test pull-cluster-api-e2e-full-main |
/hold cancel I have grouped changes in different commits for a faster review |
test/infrastructure/docker/internal/provisioning/cloudinit/writefiles_test.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/internal/provisioning/cloudinit/writefiles_test.go
Outdated
Show resolved
Hide resolved
/lgtm /hold |
LGTM label has been added. Git tree hash: f657dc1aa2e0e2d65b6b866da5276968358cb021
|
if err := yaml.Unmarshal(userData, a); err != nil { | ||
return errors.Wrapf(err, "error parsing write_files action: %s", userData) | ||
} | ||
for i, f := range a.Files { |
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.
It seems to me that adding all this code here, including kindMapping kind.Mapping
adds a lot of unnecessary complexity to the solution, as this code has nothing to do with writeFilesAction
functionality.
Given that we already have plenty of code duplicated between CloudInit and Ignition code for CAPD, I'd suggest to introduce some intermediate, common format which you can convert both CloudInit and Ignition custom data to to perform CAPD-specific mutations + deduplicate code responsible for converting it into provisioning commands.
Format can be as simple as needed, so something like:
type File struct {
Path string
Mode string
Contents string // Or []byte
}
type ProvisioningData struct {
Files []File
Commands []provisioning.Cmd
}
Then you can have a function ProvisioningData -> ProvisioningData
, which will apply CAPD specific modifications and []File -> []provisioning.Cmd
function to convert all files into creation commands.
This also obliviously enables us to reuse flags modifications between cloud init and Ignition and makes it all very easy to test as it's all data-driven.
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.
86c1de9
to
ce9291a
Compare
squashed commits |
/test pull-cluster-api-test-main |
This is complex, but actually less complex than the current state of spreading these changes across multiple templates. I think there's probably room for further simplification, but really a good change. /lgtm |
LGTM label has been added. Git tree hash: 1dd663dd5f89722192912ba2421d59b9238a0e49
|
e2e-full failed re-triggering. Let's definitely wait until it's green before merge /test pull-cluster-api-e2e-full-main |
/test pull-cluster-api-e2e-full-main to get more data on the test failures |
d876047
to
090edc2
Compare
/test pull-cluster-api-e2e-full-main |
090edc2
to
8b15bc0
Compare
/test pull-cluster-api-e2e-full-main |
/lgtm |
LGTM label has been added. Git tree hash: 0bc19f1a328076743e0e3342aa04303eca2b252c
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: killianmuldoon, sbueringer 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 |
/hold cancel |
/area provider/infrastructure-docker |
What this PR does / why we need it:
This PR uses the kind mapper introduced by #8880, and use it to automatically set some parameters in the node registration, so the kindest/node image are started as expected.
Which issue(s) this PR fixes:
Fixes #