mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-20 18:02:50 +08:00
Kubernetes Package, Code Cleanup (#845)
This commit is contained in:
parent
1d9df40af8
commit
d9dbcc0865
@ -1,7 +1,4 @@
|
||||
using KubeClient;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Ocelot.Provider.Kubernetes
|
||||
{
|
||||
|
@ -8,9 +8,9 @@ namespace Ocelot.Provider.Kubernetes
|
||||
{
|
||||
var option = new KubeClientOptions
|
||||
{
|
||||
ApiEndPoint = config.ApiEndPoint
|
||||
ApiEndPoint = config.ApiEndPoint
|
||||
};
|
||||
if(!string.IsNullOrEmpty(config?.AccessToken))
|
||||
if (!string.IsNullOrEmpty(config?.AccessToken))
|
||||
{
|
||||
option.AccessToken = config.AccessToken;
|
||||
option.AuthStrategy = config.AuthStrategy;
|
||||
|
@ -3,7 +3,6 @@ using KubeClient.Models;
|
||||
using Ocelot.Logging;
|
||||
using Ocelot.ServiceDiscovery.Providers;
|
||||
using Ocelot.Values;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -1,7 +1,5 @@
|
||||
using KubeClient;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Ocelot.Provider.Kubernetes
|
||||
{
|
||||
|
@ -10,8 +10,8 @@ namespace Ocelot.Provider.Kubernetes
|
||||
{
|
||||
public static ServiceDiscoveryFinderDelegate Get = (provider, config, name) =>
|
||||
{
|
||||
var factory = provider.GetService<IOcelotLoggerFactory>();
|
||||
return GetkubeProvider(provider, config, name, factory);
|
||||
var factory = provider.GetService<IOcelotLoggerFactory>();
|
||||
return GetkubeProvider(provider, config, name, factory);
|
||||
};
|
||||
|
||||
private static ServiceDiscovery.Providers.IServiceDiscoveryProvider GetkubeProvider(IServiceProvider provider, Configuration.ServiceProviderConfiguration config, string name, IOcelotLoggerFactory factory)
|
||||
|
@ -16,7 +16,7 @@
|
||||
<RuntimeIdentifiers>win10-x64;osx.10.11-x64;osx.10.12-x64;win7-x64</RuntimeIdentifiers>
|
||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||
<Version>0.0.0-dev</Version>
|
||||
<Authors>geffzhang</Authors>
|
||||
|
@ -1,9 +1,7 @@
|
||||
using Ocelot.Logging;
|
||||
using Ocelot.ServiceDiscovery.Providers;
|
||||
using Ocelot.Values;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -47,4 +45,3 @@ namespace Ocelot.Provider.Kubernetes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user