Add Aspire hosting integration for Apollo Configuration Center with full configuration support#253
Draft
Add Aspire hosting integration for Apollo Configuration Center with full configuration support#253
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: pengweiqhca <3982826+pengweiqhca@users.noreply.github.com>
Co-authored-by: pengweiqhca <3982826+pengweiqhca@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Aspire integration package for Apollo
Add Aspire hosting integration for Apollo Configuration Center
Dec 31, 2025
pengweiqhca
requested changes
Jan 1, 2026
| /// <param name="name">The name of the resource.</param> | ||
| /// <param name="appId">The Apollo application ID.</param> | ||
| /// <param name="metaServer">The Apollo meta server URL.</param> | ||
| public class ApolloResource(string name, string? appId, string? metaServer) : Resource(name) |
Author
There was a problem hiding this comment.
Added all missing Apollo configuration options from the README. The implementation now supports:
- Environment (Env), Cluster, DataCenter
- Secret for authentication
- ConfigServer for direct URLs
- Timeout, RefreshInterval, LocalCacheDir
- Meta for environment-specific servers
- Label and Namespaces
All options are exposed through fluent API methods (WithEnvironment, WithCluster, WithSecret, etc.) and properly mapped to environment variables. See commit 83e88fc.
Co-authored-by: pengweiqhca <3982826+pengweiqhca@users.noreply.github.com>
Co-authored-by: pengweiqhca <3982826+pengweiqhca@users.noreply.github.com>
Copilot
AI
changed the title
Add Aspire hosting integration for Apollo Configuration Center
Add Aspire hosting integration for Apollo Configuration Center with full configuration support
Jan 1, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
Aspire.Com.Ctrip.Framework.Apollo.Configurationpackage to enable .NET Aspire applications to integrate with Apollo Configuration Center with comprehensive configuration options support.Implementation
ApolloResource: Complete resource definition for Apollo configuration servers in Aspire's application model with support for all Apollo.NET configuration options:AppId,MetaServer,Env,Cluster,DataCenterSecretConfigServer(direct URLs),Meta(environment-specific servers)Timeout,RefreshInterval,LocalCacheDir,LabelNamespacesApolloResourceBuilderExtensions:AddApollo(): Registers Apollo as a configuration resourceWithAppId(),WithMetaServer(),WithEnvironment(),WithCluster(),WithDataCenter(),WithSecret(),WithConfigServer(),WithNamespaces(),WithTimeout(),WithRefreshInterval(),WithLocalCacheDir(),WithMeta(),WithLabel()WithReference(): Binds Apollo to services via environment variables with full configuration mappingPackage targets .NET 9.0, depends on
Aspire.Hosting 9.0.0andApollo.ConfigurationUsage
Basic Usage
Advanced Configuration
Services automatically receive Apollo configuration through environment variables (e.g.,
Apollo__AppId,Apollo__MetaServer,Apollo__Env,Apollo__Cluster,Apollo__Secret, etc.), compatible with existingApollo.Configurationclient library.Configuration Options Supported
All Apollo.NET configuration options are supported including:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.