Skip to content

feat: [3/5] add cloud certificate refresh orchestration and CLI - #9909

Draft
Abigail Liang (abigailliang-aks-sig-node) wants to merge 4 commits into
abigailliang/anc-cloud-protocolsfrom
abigailliang/anc-cloud-refresh
Draft

Abigail Liang (abigailliang-aks-sig-node) wants to merge 4 commits into
abigailliang/anc-cloud-protocolsfrom
abigailliang/anc-cloud-refresh

Conversation

@abigailliang-aks-sig-node

@abigailliang-aks-sig-node Abigail Liang (abigailliang-aks-sig-node) commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Part [3/5] of the native ANC cloud-initialization series. Depends on
[2/5] #9911 and is based on abigailliang/anc-cloud-protocols
so the incremental review contains only refresh orchestration and the CLI:
7 files, +546/-21.

  • Compose the existing legacy and RCV1P retrieval/install helpers into the
    unchanged certificate-refresh workflow.
  • Expose refresh-cloud-certificates --location <region> with its existing
    region normalization and 15-minute refresh budget.
  • Preserve boolean-only opt-in semantics: nonempty malformed, missing, or
    non-true values skip installation; failed/empty responses remain fatal.
  • Preserve raw certificate installation, individual-download skipping, and
    best-effort legacy trust-store failures. Context cancellation remains fatal.
  • Keep complete refresh/CLI regression coverage with this orchestration.

The standalone command refreshes certificates only: it does not configure
RepoDepot, install refresh schedules, or call provisioning scripts. Existing
provisioning still uses init-aks-cloud.sh; native activation and cron/systemd
scheduling arrive only in part 5.

Together, parts 1 through 3 preserve all 57 declarations from #9902 and add
eight direct runtime/store/protocol tests. This branch also retains #9902's
original commit as a merge parent, allowing the existing downstream PR branches
to be restacked without rewriting their published history.

Series and merge order

  1. [1/5] feat: [1/5] add cloud platform and trust-store capabilities #9910: Platform and trust-store capabilities -- based on main.
  2. [2/5] feat: [2/5] add cloud certificate retrieval protocols #9911: Certificate retrieval protocols -- based on part 1.
  3. [3/5] feat: [3/5] add cloud certificate refresh orchestration and CLI #9909: Certificate refresh and CLI -- this PR, based on part 2.
  4. [4/5] feat: [4/5] add native RepoDepot initialization #9903: RepoDepot capabilities -- based on this PR.
  5. [5/5] feat: [5/5] enable native cloud initialization before provisioning #9904: Native activation -- based on part 4.

This PR is a dependency draft, not an incomplete implementation. After the
preceding PRs merge, merge the updated main into this branch before retargeting
this PR to main and running required CI. Updating the branch first preserves
the incremental diff even if prerequisites were squash-merged. Do not merge
this PR into the dependency's feature branch.

The aggregate #9891 and former certificate PR #9902 are retained for reference.

Validation

Passed the applicable ANC/parser race suites, CI-pinned golangci-lint v2.14.0
against the preceding layer, and Linux AMD64/ARM64 builds. Declaration-level
equivalence and the exact non-cloud transplant comparison also passed.
Azure/VHD end-to-end provisioning has not been run.

Which issue(s) this PR fixes:

No linked issue.

Split certificate retrieval, trust-store installation, shared runtime, and the standalone refresh command from #9891. Preserve certificate failure semantics while keeping existing provisioning on the shell path. Include corresponding unit coverage and direct refresh tests for all supported OS families.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: be499bac-1283-498e-b5b1-59d8c91047a4
Separate the unchanged cloud runtime and trust-store installation helpers from certificate retrieval and orchestration. Add direct capability coverage without activating provisioning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: be499bac-1283-498e-b5b1-59d8c91047a4
Separate unchanged WireServer, legacy, and RCV1P retrieval from refresh orchestration. Keep all existing error policies and add direct protocol coverage without activating provisioning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: be499bac-1283-498e-b5b1-59d8c91047a4
Complete the unchanged certificate opt-in, retrieval, installation, and standalone refresh flow. Merge the original certificate source to preserve published ancestry while retaining the smaller review layers. Native provisioning and scheduling remain unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: be499bac-1283-498e-b5b1-59d8c91047a4
@github-actions

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   18 suites   1m 4s ⏱️
563 tests 563 ✅ 0 💤 0 ❌
585 runs  585 ✅ 0 💤 0 ❌

Results for commit aad1ae1.

@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 74% ➖
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% (6343 / 8386) ➖

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

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

This branch has not been deployed

No deployments
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.

1 participant