Repository navigation
[aks-preview] Add direct Pod Snapshot Restore extension commands - #10518
Alima Azamat (alimaazamat) wants to merge 6 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Thank you for your contribution Alima Azamat (@alimaazamat)! We will review the pull request and get back to you soon. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Hi Alima Azamat (@alimaazamat), |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
🟡 Changes recommended
The delegated delete operation still suppresses lookup authorization and service errors, leaving the intended error-propagation correction incomplete.
1 open issue
What changed in this PR
Adds direct Pod Snapshot Restore management through the existing aks extension wrapper, using k8s-extension rather than the AKS managed profile.
Changes:
- Allows
Microsoft.PodSnapshotfor extension operations and discovery. - Re-raises logged lifecycle and query failures.
- Adds prerequisite and ownership documentation, command examples, and focused wrapper tests.
| File | Description |
|---|---|
src/aks-preview/README.rst |
Documents direct management, broker prerequisites, and ownership restrictions. |
src/aks-preview/HISTORY.rst |
Records support and error-propagation changes under Pending. |
src/aks-preview/azext_aks_preview/tests/latest/test_pod_snapshot_extension.py |
Tests delegation, discovery, error propagation, and configuration aliases. |
src/aks-preview/azext_aks_preview/custom.py |
Re-raises errors from five extension operations. |
src/aks-preview/azext_aks_preview/_helpers.py |
Adds Pod Snapshot to the extension allowlist. |
src/aks-preview/azext_aks_preview/_help.py |
Adds direct-create and configuration-update examples. |
Review effort: Balanced
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
FumingZhang
left a comment
There was a problem hiding this comment.
Could you split the aks-preview and k8s-extension changes into separate PRs? They have different review scopes and should be reviewed independently by the respective module owners.
- Keep this PR focused on the
aks-previewintegration forMicrosoft.PodSnapshot, including the wrapper changes, help/docs, and AKS-side tests. - Move the generic
k8s-extensiondelete lookup error-handling fix, its regression tests, and version/history updates into a dedicated PR.
If the changes depend on each other, please link the two PRs and clarify the dependency.
For the aks-preview portion, please also add a focused fresh-create scenario using az aks extension create --extension-type Microsoft.PodSnapshot --config-file ... and link its live validation result. The existing update evidence can be reused where applicable; full snapshot/restore E2E coverage is not requested for this integration change.
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Split out fix: #10528 |
Expose managed profile enablement on create/update and disablement on update, with shorter pod-snapshot aliases and profile preservation tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3e9999ee-7df3-4e69-9868-14375740b6b3
Replace profile flags with the existing ClusterConfig extension wrapper, document broker configuration and ownership prerequisites, and propagate lifecycle errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3e9999ee-7df3-4e69-9868-14375740b6b3
Keep deletion idempotent for missing extensions while surfacing authorization, throttling, and service failures. Cover the real delete delegate with lookup-failure regression tests and prepare the 1.9.5 dependency release. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3e9999ee-7df3-4e69-9868-14375740b6b3
Move k8s-extension code, regression tests, and release changes to a dedicated PR for module-owner review. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3e9999ee-7df3-4e69-9868-14375740b6b3
ddd1c42 to
4e23b4e
Compare
Use customer-managed extension names and add a live-only create, configuration verification, and delete scenario. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3e9999ee-7df3-4e69-9868-14375740b6b3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3e9999ee-7df3-4e69-9868-14375740b6b3
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
@Azure/act-observability-squad Can you PTAL, this is Ignite critical |

🤖 PR Validation —⚠️ Review suggested
This PR adds warning or check suppressions. Fix the underlying warning where possible and justify each remaining suppression in a code comment or the PR description.
1 added suppression
src/aks-preview/azext_aks_preview/tests/latest/test_pod_snapshot_extension_scenario.pyself.skipTest(Related commands
az aks extension create --extension-type Microsoft.PodSnapshot --config-file psr-config.jsonaz aks extension update/show/list/deleteaz aks extension typediscovery for Pod Snapshot RestoreChanges
Replaces this PR's earlier managed-profile flags with direct extension installation through the existing
aks extensionwrapper. Addmicrosoft.podsnapshotto its allowlist; reuse the installedk8s-extensionimplementation and extension client withcluster_type="managedClusters".The request goes to
Microsoft.KubernetesConfiguration/extensions(ClusterConfig), then Extension Manager and Helm. Configuration settings, protected settings, and configuration-file arguments are forwarded by the existing wrapper. NopodSnapshotProfilewrites or profile enable/disable flags remain.Add create/update examples, broker prerequisite and ownership documentation, Pending release notes, focused delegation/discovery/error/argument-alias tests, and a live-only fresh-create scenario using
--config-file. Re-raise logged create/update/delete/show/list failures so authorization or installation failures do not appear successful; this error-propagation correction also applies to existing supported extension types.The direct-install examples and tests now use
pod-snapshot: customer-created names containingaks-managedare restricted to authorized service clients, as discovered during the separate Agent Sandbox fresh-create run.Prerequisites and ownership
k8s-extensionCLI dependency.aks-preview.k8s-extension1.8.0. Propagating a non-404 failure from deletion's initial lookup requires the corrected dependency to be separately published and installed (1.9.5proposed in [k8s-extension] Propagate non-404 delete lookup failures #10528). Updatingaks-previewalone does not update that dependency; no minimum-version gate is added here.Microsoft.ContainerService/PodSnapshotRestorePreviewAFEC validation. Direct-install eligibility remains a service registration concern.podSnapshotProfile. Disabling the profile requests deletion, not an ownership handoff; existing installations need a separately coordinated migration.broker.storageAccount,azureBlob.workloadIdentity.clientID, andazureBlob.workloadIdentity.tenantID, plus other chart/runtime settings, through the configuration file. A compatible Kata node pool is additionally required for actual snapshot/restore workloads. The wrapper does not provision these prerequisites.Validation
Live fresh-create run - October 27, 2026
Passed: fresh create with
--config-file-> show/list -> delete, using the real delegated extension implementation and Azure service, not mocked operations.westcentralus; fresh dedicated development cluster; Kubernetes 1.36.5; one Standard_D4s_v6 node; managed identity, OIDC issuer, and workload identity enabled.system:serviceaccount:pod-snapshot-system:pod-snapshot-broker, and audienceapi://AzureADTokenExchange.Configuration file shape (resource identifiers redacted here; the live run supplied real dedicated resources):
{ "broker.enabled": "true", "nodeWorker.enabled": "true", "broker.storageAccount": "<dedicated-storage-account>", "azureBlob.workloadIdentity.clientID": "<dedicated-broker-client-id>", "azureBlob.workloadIdentity.tenantID": "<tenant-id>" }az aks extension create --extension-type Microsoft.PodSnapshot --config-file ...Succeeded, instancepod-snapshot, cluster scope, namespacepod-snapshot-systemaz aks extension showSucceeded; all five configuration values exactly matched the supplied fileaz aks extension listaz aks extension delete --yes, then listagentSandboxProfileandpodSnapshotProfileremained nullpod-snapshot-systemSanitized runner log excerpt (local live execution, not an ADO pipeline run; machine paths and unrelated Python deprecation warnings omitted):
The cleanup hook repeats deletion after the explicit delete/list assertion, producing the expected "nothing to delete" warning for an already-absent instance. Successful primary deletion is established by list and independent post-run inspection, not by that warning.
Two preliminary attempts ended before extension creation: one because the cluster had returned to
Updating, and one due to an incorrect test-SDK result accessor. The cluster was allowed to reachSucceeded, the accessor was corrected, and the final committed scenario above passed. Those preliminary attempts are not claimed as successful validation.Scope: extension installation, configuration-file forwarding/persistence, discovery, and deletion. This cluster did not have a Kata pool; no snapshot/restore workload or Blob data-path E2E was attempted. Component readiness was not independently asserted by the scenario. Protected settings, upgrades, and long-term configuration durability remain outside this run.
Local validation
azdev style aks-preview: pylint and flake8 passed.azdev linter aks-preview --min-severity medium: passed.Branch synchronization and CI
main; no generated-index edits.Existing-instance update evidence - October 26, 2026
az aks extension update --config-file psr-config.json --yesand subsequent show on an existing directly managed extension inwestcentralus.broker.enabled=trueandnodeWorker.enabled=true, matching effective defaults.Succeeded; configuration persisted in the resource and Helm values; Helm revision advanced from 4 to 5.General guidelines
azdev style aks-preview.aks-previewversion retained with Pending release notes. Shared dependency release changes remain isolated in [k8s-extension] Propagate non-404 delete lookup failures #10528.