Repository navigation
Refactor K8s, Docker Compose, and AKS infrastructure to pipeline steps - #16414
Merged
Eric Erhardt (eerhardt) merged 2 commits intoApr 27, 2026
Merged
Eric Erhardt (eerhardt) merged 2 commits into
Eric Erhardt (eerhardt) merged 2 commits into
Conversation
Eric Erhardt (eerhardt)
requested review from
David Negstad (danegsta) and
Mitch Denny (mitchdenny)
as code owners
April 23, 2026 23:27
Member
Author
|
/deployment-test |
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16414Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16414" |
Contributor
|
🚀 Deployment tests starting on PR #16414... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
| var appModel = context.Model; | ||
| var executionContext = context.ExecutionContext; | ||
|
|
||
| if (executionContext.IsRunMode) |
Member
Author
There was a problem hiding this comment.
David Fowler (@davidfowl) Mitch Denny (@mitchdenny) - do you have any thoughts on this pattern? Should we conditionally add steps to the pipeline? i.e. if this is RunMode, don't add the step at all. Or should we always add the step, and then do a check early and no-op if it is RunMode.
Contributor
|
✅ Deployment E2E Tests passed — 32 passed, 0 failed, 0 cancelled View test results and recordings
|
Eric Erhardt (eerhardt)
enabled auto-merge (squash)
April 27, 2026 17:59
7 of 16 tasks
Mitch Denny (mitchdenny)
approved these changes
Apr 27, 2026
Eric Erhardt (eerhardt)
merged commit Apr 27, 2026
bc68c60
into
microsoft:main
598 of 602 checks passed
Eric Erhardt (eerhardt)
deleted the
RefactorK8sAndDockerBeforeStartPipeline
branch
April 27, 2026 23:10
22 of 25 tasks
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow up from #13780.
Apply the same BeforeStartEvent -> pipeline-step pattern previously used for Azure Container Apps and Azure App Service to the Kubernetes, Docker Compose, and Azure Kubernetes Service publishing environments.
For each integration:
Per-environment work (build deployment targets, configure OTLP, register dashboard) moves from an IDistributedApplicationEventingSubscriber.OnBeforeStartAsync into a per-env pipeline step (prepare-deployment-targets-{Name}, or prepare-aks-{Name} for AKS) registered via PipelineStepAnnotation in the env resource constructor.
Env-less validation (resource configured to publish as X but no X env exists) moves into a global validate-{...} pipeline step registered idempotently in AddXxxInfrastructureCore via a marker singleton class.
The XxxInfrastructure eventing-subscriber classes are deleted.
AKS keeps two distinct steps: prepare-aks-{Name} runs before the inner Kubernetes env's prepare-deployment-targets step (because it mutates compute resources the K8s prep reads), and aks-get-credentials-{Name} runs after Azure provisioning and before Helm prepare.