Skip to content

Commit

Permalink
Refactor OrleansExtension configuration for Kubernetes support
Browse files Browse the repository at this point in the history
Removed Kubernetes-specific configurations and added default settings for non-Kubernetes environments.
  • Loading branch information
0xF6 committed Jan 2, 2025
1 parent bf84397 commit de051dd
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/Argon.Api/Features/Orleanse/OrleansExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,25 @@ public static WebApplicationBuilder AddOrleans(this WebApplicationBuilder builde

if (builder.Environment.IsKube())
{
siloBuilder
.UseKubeMembership()
.AddActivationRepartitioner<BalanceRule>()
.AddRedisStorage(IFusionSessionGrain.StorageId, 2)
.AddPersistentStreams("default", NatsAdapterFactory.Create, options => { })
.AddPersistentStreams(IArgonEvent.ProviderId, NatsAdapterFactory.Create, options => { })
.AddBroadcastChannel(IArgonEvent.Broadcast);
//siloBuilder
// .UseKubeMembership()
// .AddActivationRepartitioner<BalanceRule>()
// .AddRedisStorage(IFusionSessionGrain.StorageId, 2)
// .AddPersistentStreams("default", NatsAdapterFactory.Create, options => { })
// .AddPersistentStreams(IArgonEvent.ProviderId, NatsAdapterFactory.Create, options => { })
// .AddBroadcastChannel(IArgonEvent.Broadcast);
}
else
{
siloBuilder
.UseLocalhostClustering()
.AddMemoryStreams("default")
.AddMemoryStreams(IArgonEvent.ProviderId)
.AddMemoryGrainStorage(IFusionSessionGrain.StorageId)
.AddBroadcastChannel(IArgonEvent.Broadcast);

}

siloBuilder
.UseLocalhostClustering()
.AddMemoryStreams("default")
.AddMemoryStreams(IArgonEvent.ProviderId)
.AddMemoryGrainStorage(IFusionSessionGrain.StorageId)
.AddBroadcastChannel(IArgonEvent.Broadcast);
});

return builder;
Expand Down

0 comments on commit de051dd

Please sign in to comment.