Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
d9e2d7f
Add Aspire.Hosting.Azure.Kubernetes package (Phase 1)
mitchdenny Apr 12, 2026
61992fb
Add AKS support implementation spec
mitchdenny Apr 12, 2026
c5fac1e
Add unit tests for AzureKubernetesEnvironment
mitchdenny Apr 12, 2026
6e06f0e
Add workload identity, VNet delegation, and NSP support
mitchdenny Apr 12, 2026
2160d3d
Add AddNodePool and WithNodePoolAffinity for workload scheduling
mitchdenny Apr 12, 2026
6f4c075
Auto-create default user node pool when none configured
mitchdenny Apr 12, 2026
a4860c4
Fix publish: add inner K8s environment to model for Helm chart genera…
mitchdenny Apr 12, 2026
1937568
Generate valid AKS Bicep instead of empty output placeholders
mitchdenny Apr 12, 2026
d4e2787
Add ACR integration and fix localhive packaging
mitchdenny Apr 12, 2026
c0b9cac
Fix localhive to include NonShipping packages in hive
mitchdenny Apr 12, 2026
26a6312
Fix MethodAccessException: use public AddKubernetesEnvironment API
mitchdenny Apr 12, 2026
15a0dd2
Revert localhive.ps1 changes
mitchdenny Apr 13, 2026
4b2ad7d
Clean up ConfigureAksInfrastructure: remove stale ProvisioningOutput …
mitchdenny Apr 13, 2026
1f05add
Add kubeconfig isolation for AKS deployments
mitchdenny Apr 13, 2026
76bd9a7
Fix resource group resolution: read from Azure config instead of Para…
mitchdenny Apr 13, 2026
c5dd451
Fix: use resource name directly instead of BicepOutputReference for c…
mitchdenny Apr 13, 2026
7d5ca59
Fix: depend on provision-azure-bicep-resources aggregation step
mitchdenny Apr 13, 2026
eb78fd1
Fix: wire container registry to inner K8s env at creation time, not d…
mitchdenny Apr 13, 2026
b93c041
Fix push steps blocking: wire push to depend on ACR provisioning
mitchdenny Apr 13, 2026
d5ae3fa
Fix push dependency: use provision-azure-bicep-resources aggregation …
mitchdenny Apr 13, 2026
ad679fa
Fix push-prereq: find step by name and add provision dependency
mitchdenny Apr 13, 2026
0580583
Add diagnostic logging to push step wiring
mitchdenny Apr 13, 2026
7e21efb
Fix push steps having no dependencies in K8s compute environment
mitchdenny Apr 13, 2026
f06572d
Fix resource group resolution: query Azure directly via az aks list
mitchdenny Apr 13, 2026
4f139f8
Fix az aks get-credentials arguments: quote values and clean resource…
mitchdenny Apr 13, 2026
edf1979
Fix resource group query: use az resource list instead of az aks list
mitchdenny Apr 13, 2026
24e7f0d
Fix resource group from deployment state + attach ACR to AKS
mitchdenny Apr 13, 2026
5d02506
Add AcrPull role assignment in Bicep instead of CLI
mitchdenny Apr 13, 2026
4c8cdf5
Add AKS cluster info and get-credentials command to deploy summary
mitchdenny Apr 13, 2026
7cae999
Fix Bicep BCP120: use compile-time values for role assignment name
mitchdenny Apr 13, 2026
50ba100
Fix first deploy: fall back to az CLI when deployment state not loaded
mitchdenny Apr 13, 2026
3e15ec5
Support multi-environment AKS with shared ACR and WithComputeEnvironment
mitchdenny Apr 13, 2026
5a873e0
Add multi-environment targeting test
mitchdenny Apr 13, 2026
a137935
Fix publish to include compute resources in Helm chart templates
mitchdenny Apr 13, 2026
88d44c2
Fix Helm template parse error for Azure Bicep output references
mitchdenny Apr 13, 2026
352e369
Add VNet subnet integration for AKS via WithDelegatedSubnet
mitchdenny Apr 14, 2026
60dcd9e
Fix: AKS doesn't support subnet delegation — add WithSubnet extension
mitchdenny Apr 14, 2026
72f58b7
Resolve IValueProvider expressions in Helm values at deploy time
mitchdenny Apr 14, 2026
e5ff9f1
Fix composite expressions with deferred values + scope Helm chart names
mitchdenny Apr 14, 2026
4510585
Fix deferred value detection: recurse into connection strings and exp…
mitchdenny Apr 14, 2026
3002346
Fix Helm key: use env var name instead of value expression for deferr…
mitchdenny Apr 14, 2026
bdacd7a
Move node pool to base K8s package with WithNodePool API
mitchdenny Apr 14, 2026
5021b94
Add AzureVmSizes constants class and generator tool
mitchdenny Apr 14, 2026
9bc386c
Support per-node-pool subnet via WithSubnet on AksNodePoolResource
mitchdenny Apr 14, 2026
0b11dcf
Implement workload identity via AppIdentityAnnotation
mitchdenny Apr 14, 2026
e7d7da5
Fix empty workload identity clientId in ServiceAccount annotation
mitchdenny Apr 14, 2026
42f669d
Fix missing workload identity pod label
mitchdenny Apr 14, 2026
333f62d
Rename AzureVmSizes to AksNodeVmSizes
mitchdenny Apr 14, 2026
91b81f1
Update AKS spec to reflect current implementation
mitchdenny Apr 14, 2026
e6674d5
Query all US regions for VM sizes in GenVmSizes tool
mitchdenny Apr 15, 2026
5d2fb36
Address PR review: pragmas and DelegatedSubnetAnnotation
mitchdenny Apr 15, 2026
59d290b
Enable ATS exports for all AKS public APIs
mitchdenny Apr 15, 2026
bb3566a
Refactor az CLI usage to shared ProcessSpec/ProcessUtil infrastructure
mitchdenny Apr 15, 2026
d59a000
Use IFileSystemService for kubeconfig temp directory
mitchdenny Apr 15, 2026
02c22dd
Capture kubeconfig via stdout to control file permissions
mitchdenny Apr 15, 2026
6ac7c33
Remove redundant HelmValue allocation in ResolveUnknownValue
mitchdenny Apr 15, 2026
7788491
Fix node pool model bugs and update AKS API version
mitchdenny Apr 15, 2026
20ad6d6
Migrate to Azure.Provisioning.ContainerService SDK
mitchdenny Apr 15, 2026
312b317
Fix cluster name resolution after Azure.Provisioning migration
mitchdenny Apr 15, 2026
3257052
Fix code review findings
mitchdenny Apr 15, 2026
2af9872
Fix markdownlint errors in AKS spec
mitchdenny Apr 15, 2026
26ab947
Address James's PR feedback
mitchdenny Apr 15, 2026
2a474d6
Remove AsPrivateCluster and WithSkuTier public APIs
mitchdenny Apr 15, 2026
96b05b0
Add T1.1 AKS E2E deployment test with Azure Provisioning
mitchdenny Apr 15, 2026
11c7080
Add Tier 1 AKS E2E deployment tests (T1.2-T1.7)
mitchdenny Apr 15, 2026
fc22bec
Add TypeScript AppHost AKS E2E deployment tests
mitchdenny Apr 15, 2026
8612d95
Remove WithVersion public API — use ConfigureInfrastructure instead
mitchdenny Apr 15, 2026
6fd1c19
Remove non-functional WithContainerInsights and WithAzureLogAnalytics…
mitchdenny Apr 15, 2026
a96bb94
Fix AppHost.cs modification in all AKS E2E tests
mitchdenny Apr 15, 2026
5c1ba69
Use smaller VM sizes to avoid quota exhaustion in CI
mitchdenny Apr 15, 2026
21c2b1d
Address Eric's feedback: remove IVT, rename property, remove E2E tests
mitchdenny Apr 16, 2026
b42c60d
Make AddNodePool vmSize and count parameters optional
mitchdenny Apr 16, 2026
f1de02d
Remove Unsecured auth mode from K8s dashboard
mitchdenny Apr 16, 2026
6eb4306
Address JamesNK review feedback: fix node pool annotation, add az CLI…
mitchdenny Apr 16, 2026
fb883c0
Add dashboard login token kubectl logs command to print summary
mitchdenny Apr 16, 2026
0d5ac11
Fix dashboard logs label selector to use app.kubernetes.io/component
mitchdenny Apr 16, 2026
0defaaa
Address security feedback: validation ordering, stale annotations, co…
mitchdenny Apr 17, 2026
95e3164
Add enabled parameter to WithWorkloadIdentity for opt-out support
mitchdenny Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/update-azure-vm-sizes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Update Azure VM Sizes

on:
workflow_dispatch:
schedule:
- cron: '0 6 1 * *' # Monthly on the 1st at 06:00 UTC

permissions:
contents: write
pull-requests: write

jobs:
generate-and-pr:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'microsoft' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Azure Login
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Generate updated Azure VM size descriptors
working-directory: src/Aspire.Hosting.Azure.Kubernetes/tools
run: |
set -e
"$GITHUB_WORKSPACE/dotnet.sh" run GenVmSizes.cs

- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
with:
app-id: ${{ secrets.ASPIRE_BOT_APP_ID }}
private-key: ${{ secrets.ASPIRE_BOT_PRIVATE_KEY }}

- name: Create or update pull request
uses: ./.github/actions/create-pull-request
with:
token: ${{ steps.app-token.outputs.token }}
branch: update-azure-vm-sizes
base: main
commit-message: "[Automated] Update Azure VM Sizes"
labels: |
area-integrations
area-engineering-systems
title: "[Automated] Update Azure VM Sizes"
body: "Auto-generated update of Azure VM size descriptors (AksNodeVmSizes.Generated.cs)."
2 changes: 2 additions & 0 deletions Aspire.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<Project Path="src/Aspire.Hosting.Azure.EventHubs/Aspire.Hosting.Azure.EventHubs.csproj" />
<Project Path="src/Aspire.Hosting.Azure.Functions/Aspire.Hosting.Azure.Functions.csproj" />
<Project Path="src/Aspire.Hosting.Azure.KeyVault/Aspire.Hosting.Azure.KeyVault.csproj" />
<Project Path="src/Aspire.Hosting.Azure.Kubernetes/Aspire.Hosting.Azure.Kubernetes.csproj" />
<Project Path="src/Aspire.Hosting.Azure.Kusto/Aspire.Hosting.Azure.Kusto.csproj" />
<Project Path="src/Aspire.Hosting.Azure.Network/Aspire.Hosting.Azure.Network.csproj" />
<Project Path="src/Aspire.Hosting.Azure.OperationalInsights/Aspire.Hosting.Azure.OperationalInsights.csproj" />
Expand Down Expand Up @@ -472,6 +473,7 @@
<Project Path="tests/Aspire.Hosting.Analyzers.Tests/Aspire.Hosting.Analyzers.Tests.csproj" />
<Project Path="tests/Aspire.Hosting.Foundry.Tests/Aspire.Hosting.Foundry.Tests.csproj" />
<Project Path="tests/Aspire.Hosting.Azure.Kusto.Tests/Aspire.Hosting.Azure.Kusto.Tests.csproj" />
<Project Path="tests/Aspire.Hosting.Azure.Kubernetes.Tests/Aspire.Hosting.Azure.Kubernetes.Tests.csproj" />
<Project Path="tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj" />
<Project Path="tests/Aspire.Hosting.Containers.Tests/Aspire.Hosting.Containers.Tests.csproj" />
<Project Path="tests/Aspire.Hosting.DevTunnels.Tests/Aspire.Hosting.DevTunnels.Tests.csproj" />
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<PackageVersion Include="Azure.Provisioning.AppService" Version="1.3.1" />
<PackageVersion Include="Azure.Provisioning.ApplicationInsights" Version="1.1.0" />
<PackageVersion Include="Azure.Provisioning.ContainerRegistry" Version="1.1.0" />
<PackageVersion Include="Azure.Provisioning.ContainerService" Version="1.0.0-beta.3" />
Comment thread
mitchdenny marked this conversation as resolved.
<PackageVersion Include="Azure.Provisioning.CognitiveServices" Version="1.2.0" />
<PackageVersion Include="Azure.Provisioning.CosmosDB" Version="1.0.0" />
<PackageVersion Include="Azure.Provisioning.EventHubs" Version="1.1.0" />
Expand Down
620 changes: 620 additions & 0 deletions docs/specs/aks-support.md

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions src/Aspire.Hosting.Azure.Kubernetes/AksNetworkProfile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Aspire.Hosting.Azure.Kubernetes;

/// <summary>
/// Network profile configuration for an AKS cluster.
/// </summary>
internal sealed class AksNetworkProfile
{
/// <summary>
/// Gets or sets the network plugin. Defaults to "azure" for Azure CNI.
/// </summary>
public string NetworkPlugin { get; set; } = "azure";

/// <summary>
/// Gets or sets the network policy. Defaults to "calico".
/// </summary>
public string? NetworkPolicy { get; set; } = "calico";

/// <summary>
/// Gets or sets the service CIDR.
/// </summary>
public string ServiceCidr { get; set; } = "10.0.4.0/22";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hardcoded ServiceCidr default (10.0.4.0/22) overlaps with the spec's example subnets.

This CIDR overlaps with the spec's example GPU subnet (10.0.4.0/24). While AksNetworkProfile is currently internal and only used when explicitly set, if the network profile is ever auto-applied alongside subnet configuration, this default will silently conflict with user-configured VNet address spaces. Consider using a non-overlapping default (e.g., 172.16.0.0/16) or documenting the constraint prominently.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

AksNetworkProfile is internal and only used when explicitly configured — it is never auto-applied. The overlap is with spec example subnets, not actual defaults. No action needed.

/// <summary>
/// Gets or sets the DNS service IP address.
/// </summary>
public string DnsServiceIP { get; set; } = "10.0.4.10";
}
35 changes: 35 additions & 0 deletions src/Aspire.Hosting.Azure.Kubernetes/AksNodePoolConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Aspire.Hosting.Azure.Kubernetes;

/// <summary>
/// Configuration for an AKS node pool.
/// </summary>
/// <param name="Name">The name of the node pool.</param>
/// <param name="VmSize">The VM size for nodes in the pool.</param>
/// <param name="MinCount">The minimum number of nodes.</param>
/// <param name="MaxCount">The maximum number of nodes.</param>
/// <param name="Mode">The mode of the node pool.</param>
public sealed record AksNodePoolConfig(
string Name,
string VmSize,
int MinCount,
int MaxCount,
AksNodePoolMode Mode);

/// <summary>
/// Specifies the mode of an AKS node pool.
/// </summary>
public enum AksNodePoolMode
{
/// <summary>
/// System node pool for hosting system pods.
/// </summary>
System,

/// <summary>
/// User node pool for hosting application workloads.
/// </summary>
User
}
30 changes: 30 additions & 0 deletions src/Aspire.Hosting.Azure.Kubernetes/AksNodePoolResource.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Aspire.Hosting.Kubernetes;

namespace Aspire.Hosting.Azure.Kubernetes;

/// <summary>
/// Represents an AKS node pool with Azure-specific configuration such as VM size and autoscaling.
/// Extends the base <see cref="KubernetesNodePoolResource"/> with provisioning configuration
/// that is used to generate Azure Bicep for the AKS agent pool profile.
/// </summary>
/// <param name="name">The name of the node pool resource.</param>
/// <param name="config">The Azure-specific node pool configuration.</param>
/// <param name="parent">The parent AKS environment resource.</param>
public class AksNodePoolResource(
string name,
AksNodePoolConfig config,
AzureKubernetesEnvironmentResource parent) : KubernetesNodePoolResource(name, parent.KubernetesEnvironment)
{
/// <summary>
/// Gets the parent AKS environment resource.
/// </summary>
public AzureKubernetesEnvironmentResource AksParent { get; } = parent ?? throw new ArgumentNullException(nameof(parent));

/// <summary>
/// Gets the Azure-specific node pool configuration.
/// </summary>
public AksNodePoolConfig Config { get; } = config ?? throw new ArgumentNullException(nameof(config));
}
Loading
Loading