feat: add OSSKU-based IsCgroupV2 detection and CustomizedImageTrustedLaunch distro#8252
Open
aadhar-agarwal wants to merge 1 commit intomainfrom
Open
feat: add OSSKU-based IsCgroupV2 detection and CustomizedImageTrustedLaunch distro#8252aadhar-agarwal wants to merge 1 commit intomainfrom
aadhar-agarwal wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes IsCgroupV2 template detection for BYOI/customized-image scenarios by switching Flatcar/ACL checks to OSSKU-based helpers and explicitly handling AzureLinux OSSKU, and it introduces a new CustomizedImageTrustedLaunch distro to represent trusted-launch customized images without proliferating per-OS custom distro constants.
Changes:
- Update
IsCgroupV2to useconfig.IsFlatcar()/config.IsACL()(OSSKU-aware) and add an explicitOSSKUAzureLinuxcheck. - Add
CustomizedImageTrustedLaunchdistro and treat it as a “custom image” in bootstrapping flows. - Add unit tests covering cgroupv2 detection for customized images and bootstrapping behavior for the new distro.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/agent/datamodel/types.go | Adds the CustomizedImageTrustedLaunch distro constant. |
| pkg/agent/bakerapi.go | Treats CustomizedImageTrustedLaunch like other customized images (bypasses SIG/PIR image lookup). |
| pkg/agent/bakerapi_test.go | Adds coverage ensuring bootstrapping doesn’t error for CustomizedImageTrustedLaunch. |
| pkg/agent/baker.go | Updates IsCgroupV2 to be OSSKU-aware for AzureLinux/Flatcar/ACL; includes new distro in IsCustomImage. |
| pkg/agent/baker_test.go | Adds tests asserting NEEDS_CGROUPV2=true for customized-image + OSSKU combinations. |
22b3cc2 to
5e3aab8
Compare
hbeberman
approved these changes
Apr 8, 2026
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:
Fixes cgroupv2 detection for BYOI scenarios and adds the
CustomizedImageTrustedLaunchdistro.Changes:
IsCgroupV2: Add explicit config.OSSKU == OSSKUAzureLinux check and switch Flatcar/ACL detection fromprofile.Is*() (distro-based, always false for customized images) toconfig.Is*()(OSSKU-based)CustomizedImageTrustedLaunch: New distro constantWhy do we need it:
BYOI nodes using AzureLinux/Flatcar/ACL images were not getting
NEEDS_CGROUPV2=truebecause the distro-level helpers return false for customized imagesAdding
CustomizedImageTrustedLaunchas a distro avoids needing separate customized image distro constants for an OS variant to support trusted launch. (for eg. CustomizedImageACL)Which issue(s) this PR fixes:
Fixes #7999
Testing: