-
-
Notifications
You must be signed in to change notification settings - Fork 170
Add Aspire hosting integration for Apollo Configuration Center with full configuration support #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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>
| /// <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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many options are missing, see REAMDE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
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.