Merged
Conversation
657b63d to
60ef954
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces Flatcar customData size by embedding generated file payloads into a single tarball that’s included in Ignition customData and extracted during early boot (since Ignition customData itself can’t be gzipped).
Changes:
- Pack Flatcar
write_files+bootcmdartifacts into a tarball, embed it in Ignition, and extract it at boot via a new systemd unit. - Remove the previous “Ignition envelope” wrapping approach for Flatcar customData generation.
- Update Flatcar snapshot testdata and unit tests to validate the tarball-based approach.
Reviewed changes
Copilot reviewed 4 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/agent/baker.go | Builds a tarball from cloud-init payloads, embeds it in Ignition, and stops using the prior envelope wrapping for Flatcar. |
| parts/linux/cloud-init/flatcar.yml | Adds ignition-file-extract.service to extract the tar payload before ignition-bootcmds.service runs. |
| pkg/agent/utils.go | Adds a gzip decode helper used by the new tarball pipeline and tests. |
| pkg/agent/baker_test.go | Updates tests/helpers to decode and inspect the tarball payload, and adjusts Flatcar expectations (units/files). |
| pkg/agent/testdata/Flatcar/CustomData | Refreshes Flatcar customData snapshot to match the new tarball + extract-unit format. |
60ef954 to
3fc9450
Compare
3fc9450 to
cd4daad
Compare
pkg/agent/baker.go
Outdated
Contributor
There was a problem hiding this comment.
nit: can we set this up top as the default and then avoid the nested if/else?
Member
Author
There was a problem hiding this comment.
sure, reworked the nesting into a flat block
cd4daad to
0a85016
Compare
0a85016 to
f5e0c6c
Compare
f5e0c6c to
7d8238b
Compare
7d8238b to
b8328fc
Compare
The tarball is extracted very early during boot. Doing it this way makes compression equally effective as cloud-init's whole config compression and gets rid of the size problems we were hitting with the previous approach for flatcar. The previous approach was effectively: base64(gzip([]base64(gzip(files)))) while the new one is more like base64(gzip([]files)). Cloud-init does: gzip([]base64(gzip)).
b8328fc to
13d6a34
Compare
awesomenix
approved these changes
Feb 3, 2026
cameronmeissner
approved these changes
Feb 3, 2026
Contributor
|
Testing Flatcar changes here https://msazure.visualstudio.com/CloudNativeCompute/_build/results?buildId=151725830&view=results |
mxj220
pushed a commit
that referenced
this pull request
Feb 5, 2026
aadhar-agarwal
added a commit
that referenced
this pull request
Feb 16, 2026
Cherry-pick 068403d with conflict resolution: - flatcar.yml: kept Issue 9 symlink workaround AND new ignition-file-extract.service - Added storage.links symlink for ignition-file-extract.service (Issue 9 compat) - Testdata regenerated via make generate CustomData reduced from 62,761 to 55,991 chars (~11% smaller).
aadhar-agarwal
added a commit
that referenced
this pull request
Feb 16, 2026
Cherry-pick 068403d with conflict resolution: - flatcar.yml: kept Issue 9 symlink workaround AND new ignition-file-extract.service - Added storage.links symlink for ignition-file-extract.service (Issue 9 compat) - Testdata regenerated via make generate CustomData reduced from 62,761 to 55,991 chars (~11% smaller).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR changes the way customdata is handled for Flatcar nodepools, by packing up all file contents into a tarball, putting that into the customdata and unpacking at runtime. This allows the file contents to be compressed more efficiently than before. Flatcar's customdata handler (ignition) does not support gzipped customdata.
Which issue(s) this PR fixes:
Fixes #