-
Notifications
You must be signed in to change notification settings - Fork 88
Add Minio hosting/client integration #691
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?
Add Minio hosting/client integration #691
Conversation
bced977
to
6d8e405
Compare
Would love to see this get finished off. |
6d8e405
to
1a79db3
Compare
src/CommunityToolkit.Aspire.Hosting.Minio/MinioBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
IResourceBuilder<ParameterResource>? rootUser = null, | ||
IResourceBuilder<ParameterResource>? rootPassword = null, | ||
int minioPort = 9000, | ||
int minioConsolePort = 9001) |
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.
Remove, this is usually fixed
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.
Thanks!
This is usually fixed, and thinking too much about Minio Console should probably be out of scope for now.
|
||
namespace CommunityToolkit.Aspire.Hosting.Minio; | ||
|
||
internal sealed class MinioHealthCheck : IHealthCheck |
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.
You might be able to use the built in http health check instead of the custom one.
This looks really good! Left a few comments. |
I've added WithDataVolume/WithDataBindMount methods to this, because even a basic S3-compatible storage integration wihtout the way to permanently store data isn't up to my personal quality standarts Also working on @davidfowl comments got me thinking that me "inventing" a connection string for MiniO looking like
may not have been such a good idea (here's a link for further reference) But currently I cannot think about any other convinient way of passing connection parameters to ApiServices in a DistributedApplication. I'd be genuinely glad to hear any opinions on this |
src/CommunityToolkit.Aspire.Hosting.Minio/MinioContainerResource.cs
Outdated
Show resolved
Hide resolved
It's a good idea. Just expose all of the parts of the connection string so the users can make their own connection strings, but having a default is good. |
@@ -79,7 +79,7 @@ void Configure(DistributedApplicationOptions applicationOptions, HostApplication | |||
var cfg = hostBuilderOptions.Configuration ??= new(); | |||
cfg.AddInMemoryCollection(new Dictionary<string, string?> | |||
{ | |||
["DcpPublisher:RandomizePorts"] = "true", | |||
["DcpPublisher:RandomizePorts"] = "false", |
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.
For all tests?
**Closes #606 **
I've added maybe somewhat barebone (but working!) MiniO storage and client (based on the official https://github.com/minio/minio-dotnet library). It was a ton of fun.
I've added
to ConformanceTests.cs/ConnectionInformationIsDelayValidated because this integration doesn't support keyed registrations untill minio/minio-dotnet#1147 is resolved. I hope this isn't too much, but maybe it should've been done in separate PR.
PR Checklist
Other information