Skip to content

feat(aks-node-controller): support optional containerd image-pull settings - #9888

Merged
Sri Harsha (SriHarsha001) merged 4 commits into
mainfrom
sharsha/ContainerDBootStrapUserData
Oct 27, 2026
Merged

Sri Harsha (SriHarsha001) merged 4 commits into
mainfrom
sharsha/ContainerDBootStrapUserData

Conversation

@SriHarsha001

@SriHarsha001 Sri Harsha (SriHarsha001) commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds ANC contract and rendering support for two customer-provided containerd
settings in the BootStrapUserData :

  • imagePullWithSyncFs
  • imagePullProgressTimeout

AKS RP can map validated customer input into Configuration.ContainerdConfig
and send it to ANC through the existing bootstrap configuration flow.

  • Add optional protobuf fields, preserving existing field numbers, and
    regenerate the Go bindings.
  • Validate the progress timeout as a nonnegative Go duration. Zero disables
    the timeout; explicitly empty or malformed values are rejected.
  • Render supplied values in all four existing containerd templates
    (1.x/2.x, GPU/non-GPU).
  • Add tests for validation, field-presence preservation, serialization,
    template placement, and delivery through existing configuration variables.

When the new fields are omitted, existing rendered configuration is unchanged.
Explicit false is preserved.

No changes to provisioning scripts, service lifecycle, parser flow, or dependencies.

This applies only when existing provisioning generates containerd configuration.PIS-cached nodes that skip basePrep and preserved NVIDIA configurations are excluded. Containerd configuration is generated during basePrep, not nodePrep. For PIS, settings applied during preparation can be baked into the image, but settings supplied only during subsequent VM provisioning are not applied. The current legacy PIS delivery path is also outside this ANC-only change.

Enabling imagePullWithSyncFs can select local image-pull mode on containerd
releases using Transfer Service pulls, potentially affecting performance.

Which issue(s) this PR fixes:

Fixes #

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 26, 2026, 11:50 PM

@SriHarsha001 Sri Harsha (SriHarsha001) changed the title aks-node-controller/parser/containerd_test.go feat(aks-node-controller): support optional containerd image-pull settings Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   18 suites   55s ⏱️
563 tests 563 ✅ 0 💤 0 ❌
585 runs  585 ✅ 0 💤 0 ❌

Results for commit 7efa96c.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Explicit image-pull overrides are silently ignored on Ubuntu 24.04 NVIDIA_GB nodes that preserve their baked containerd configuration.

1 open issue
1 file not reviewed
  • aks-node-controller/pkg/gen/aksnodeconfig/v1/containerd_config.pb.go: Generated file
What changed in this PR

Adds optional containerd image-pull settings to aks-node-controller, preserving field presence so explicit false and zero-timeout values can be distinguished from omitted settings.

Changes:

  • Extends the protobuf API and generated Go bindings with synchronization and progress-timeout options.
  • Validates timeout values and renders supplied settings across containerd 1.x/2.x GPU and non-GPU templates.
  • Adds validation, serialization, template, and command-generation tests.
File Description
aks-node-controller/​proto/​aksnodeconfig/​v1/​containerd_config.proto Defines optional image-pull settings.
aks-node-controller/​pkg/​nodeconfigutils/​validation.go Validates timeout format and rejects negative durations.
aks-node-controller/​pkg/​nodeconfigutils/​validation_test.go Tests valid, invalid, and omitted timeouts.
aks-node-controller/​pkg/​nodeconfigutils/​utils_test.go Tests field presence through JSON and protobuf round trips.
aks-node-controller/​pkg/​gen/​aksnodeconfig/​v1/​containerd_config.pb.go Adds generated fields, getters, and descriptors.
aks-node-controller/​parser/​templates/​containerd.toml.gtpl Renders optional settings for containerd 1.x.
aks-node-controller/​parser/​templates/​containerd_v2.toml.gtpl Renders optional settings for containerd 2.x.
aks-node-controller/​parser/​templates/​containerd_v2_no_GPU.toml.gtpl Adds settings to the non-GPU containerd 2.x template.
aks-node-controller/​parser/​templates/​containerd_no_GPU.toml.gtpl Adds settings to the non-GPU containerd 1.x template.
aks-node-controller/​parser/​parser_test.go Tests settings in generated provisioning payloads.
aks-node-controller/​parser/​helper_test.go Tests presence-aware rendering across template variants.

Review effort: Balanced

Comment thread aks-node-controller/proto/aksnodeconfig/v1/containerd_config.proto
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
test 0% ❌
windows 27% ❌
staging_cse_windows Package 1 65% ➖
debug 0% ❌
provisioningscripts 2% ❌
parts_windows Package 1 73% ➖
Summary 38% (1652 / 6834) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
github.com/Azure/agentbaker/aks-node-controller 73% ➖
github.com/Azure/agentbaker/aks-node-controller/common 100% ✔
github.com/Azure/agentbaker/aks-node-controller/helpers 68% ➖
github.com/Azure/agentbaker/aks-node-controller/parser 88% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/gpu 100% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/nodeconfigutils 89% ✔
github.com/Azure/agentbaker/aks-node-controller/utils 0% ❌
github.com/Azure/agentbaker/apiserver 24% ❌
github.com/Azure/agentbaker/cmd 0% ❌
github.com/Azure/agentbaker/cmd/starter 0% ❌
github.com/Azure/agentbaker/fuzz/api 0% ❌
github.com/Azure/agentbaker/hotfix/render-nodecustomdata 35% ❌
github.com/Azure/agentbaker/pkg/agent 78% ➖
github.com/Azure/agentbaker/pkg/agent/datamodel 77% ➖
github.com/Azure/agentbaker/pkg/agent/toggles 0% ❌
github.com/Azure/agentbaker/pkg/vhdbuilder/datamodel 87% ✔
Summary 75% (6026 / 7992) ➖

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 29% ❌
Summary 29% (4595 / 16086) ❌

@SriHarsha001
Sri Harsha (SriHarsha001) marked this pull request as ready for review October 27, 2026 00:09
Copilot AI balanced review requested due to automatic review settings October 27, 2026 00:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Supported-runtime compatibility and filesystem synchronization’s pull-mode and performance effects require human validation beyond the rendering and serialization tests.

No open issues 🎉

1 resolved since last review
1 file not reviewed
  • aks-node-controller/pkg/gen/aksnodeconfig/v1/containerd_config.pb.go: Generated file

Review effort: Balanced

@SriHarsha001
Sri Harsha (SriHarsha001) merged commit da97982 into main Oct 27, 2026
42 of 43 checks passed
@SriHarsha001
Sri Harsha (SriHarsha001) deleted the sharsha/ContainerDBootStrapUserData branch October 27, 2026 19:14
@Devinwong

Copy link
Copy Markdown
Collaborator

LGTM too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants