[release/13.5] Add AKS persistent volume support - #19264
[release/13.5] Add AKS persistent volume support#19264Jose Perez Rodriguez (joperezr) merged 5 commits into
Conversation
Expose the Kubernetes persistent volume API through Azure Kubernetes environments and document the managed disk default. Add unit, polyglot, and deployment coverage for persistence across redeployments. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19264Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19264" |
There was a problem hiding this comment.
Pull request overview
Note
Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.
Adds AKS persistent volume support and coverage across SDKs, including documentation, unit tests/snapshots, and an Azure deployment E2E test to validate redeploy persistence.
Changes:
- Add
AddPersistentVolumeextension forAzureKubernetesEnvironmentResourceand document usage (C# + TypeScript). - Add unit test + verified YAML snapshot for generated PersistentVolumeClaim output.
- Add deployment E2E test that verifies PVC data survives an app redeploy.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/PolyglotAppHosts/Aspire.Hosting/TypeScript/apphost.mts | Adds an AKS persistent volume to the TS polyglot app host. |
| tests/PolyglotAppHosts/Aspire.Hosting/Java/AppHost.java | Adds an AKS persistent volume to the Java polyglot app host. |
| tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesPersistentVolumeTests.AksAddPersistentVolume_GeneratesClaimUsingClusterDefaults.verified.yaml | Adds snapshot for generated PVC YAML. |
| tests/Aspire.Hosting.Azure.Kubernetes.Tests/AzureKubernetesPersistentVolumeTests.cs | Adds unit tests for AKS persistent volume parent + YAML generation. |
| tests/Aspire.Deployment.EndToEnd.Tests/AksPersistentVolumeDeploymentTests.cs | Adds Azure deployment E2E test validating PVC survives redeploy. |
| src/Aspire.Hosting.Azure.Kubernetes/README.md | Documents persistent volume creation and mounting in C# and TypeScript. |
| src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesPersistentVolumeExtensions.cs | Introduces AddPersistentVolume extension on AKS environment builder. |
| src/Aspire.Hosting.Azure.Kubernetes/Aspire.Hosting.Azure.Kubernetes.csproj | Enables Aspire integration analyzers for the package. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| @@ -0,0 +1,11 @@ | |||
| --- | |||
| try | ||
| { | ||
| process.Start(); | ||
| await process.WaitForExitAsync(); |
| var deploymentRevision = app.Configuration["DEPLOYMENT_REVISION"] | ||
| ?? throw new InvalidOperationException("DEPLOYMENT_REVISION is not configured."); | ||
|
|
||
| app.MapGet("/", async (string action) => |
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 3 / 100 test projects · 4 jobs, from 7 changed files. Selected test projects (3 / 100)
Selected jobs (4)
How these were chosen — grouped by what changed🔧 🔧 🧪 🧪 🧪 Job reasons
Selection computed for commit |
|
Correctness check, low risk. |
e382453
into
release/13.5
|
✅ No documentation update needed. Step 5 branch taken:
Exclusion reasons (from
Triggered signals (3, not evaluated further since excluded overrides): The original (forward) PR #19226 on the default branch is the canonical source for documenting this AKS persistent volume feature; drafting a docs PR here would duplicate that effort. No docs PR created. |
Backport of #19226 to release/13.5
/cc Mitch Denny (@mitchdenny)
Customer Impact
AKS users cannot declare persistent volumes through
AddAzureKubernetesEnvironment; following the 13.5 Kubernetes persistent-volume guidance results in a compile-time API error and blocks persistent storage on AKS.Testing
69 AKS hosting tests passed; the deployment test project built successfully; C# and TypeScript publish scenarios and cross-environment validation passed; and a live AKS E2E proved data persisted after pod replacement and redeployment.
Risk
Medium. This adds public AKS API surface, but the implementation is a localized forwarding layer over the existing Kubernetes persistent-volume support and has unit, polyglot, publish, and live AKS deployment coverage.
Regression?
No. This fills a missing AKS API surface rather than restoring previously supported behavior.