mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-30 18:32:51 +08:00
17 lines
507 B
C#
17 lines
507 B
C#
using KubeClient;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Ocelot.DependencyInjection;
|
|
|
|
namespace Ocelot.Provider.Kubernetes
|
|
{
|
|
public static class OcelotBuilderExtensions
|
|
{
|
|
public static IOcelotBuilder AddKubernetes(this IOcelotBuilder builder, bool usePodServiceAccount = true)
|
|
{
|
|
builder.Services.AddSingleton(KubernetesProviderFactory.Get);
|
|
builder.Services.AddKubeClient(usePodServiceAccount);
|
|
return builder;
|
|
}
|
|
}
|
|
}
|