diff --git a/src/Ocelot.Provider.Kubernetes/KubernetesProviderFactory.cs b/src/Ocelot.Provider.Kubernetes/KubernetesProviderFactory.cs index 0de5e389..30ed2c85 100644 --- a/src/Ocelot.Provider.Kubernetes/KubernetesProviderFactory.cs +++ b/src/Ocelot.Provider.Kubernetes/KubernetesProviderFactory.cs @@ -21,7 +21,7 @@ namespace Ocelot.Provider.Kubernetes { ApiEndPoint = new Uri($"https://{config.Host}:{config.Port}"), KeyOfServiceInK8s = name, - KubeNamespace = config.Namesapce, + KubeNamespace = config.Namespace, AuthStrategy = KubeAuthStrategy.BearerToken, AccessToken = config.Token, AllowInsecure = true // Don't validate server certificate diff --git a/src/Ocelot.Provider.Kubernetes/Ocelot.Provider.Kubernetes.csproj b/src/Ocelot.Provider.Kubernetes/Ocelot.Provider.Kubernetes.csproj index a9c43364..adc4433c 100644 --- a/src/Ocelot.Provider.Kubernetes/Ocelot.Provider.Kubernetes.csproj +++ b/src/Ocelot.Provider.Kubernetes/Ocelot.Provider.Kubernetes.csproj @@ -1,17 +1,27 @@ - + netstandard2.0 - true - 0.0.0-dev - geffzhang - + 2.0.0 + 2.0.0 + true Ocelot Provides Ocelot extensions to use kubernetes https://github.com/ThreeMammals/Ocelot http://threemammals.com/images/ocelot_logo.png + Ocelot.Provider.Kubernetes + Ocelot.Provider.Kubernetes API Gateway;.NET core + win10-x64;osx.10.11-x64;osx.10.12-x64;win7-x64 + false + false + True + false + 0.0.0-dev + geffzhang + + ..\..\codeanalysis.ruleset diff --git a/src/Ocelot/Configuration/Builder/ServiceProviderConfigurationBuilder.cs b/src/Ocelot/Configuration/Builder/ServiceProviderConfigurationBuilder.cs index e9cc947f..16ec15d0 100644 --- a/src/Ocelot/Configuration/Builder/ServiceProviderConfigurationBuilder.cs +++ b/src/Ocelot/Configuration/Builder/ServiceProviderConfigurationBuilder.cs @@ -46,9 +46,9 @@ namespace Ocelot.Configuration.Builder return this; } - public ServiceProviderConfigurationBuilder WithNamesapce(string @namesapce) + public ServiceProviderConfigurationBuilder WithNamespace(string @namespace) { - _namespace = @namesapce; + _namespace = @namespace; return this; } diff --git a/src/Ocelot/Configuration/Creator/ServiceProviderConfigurationCreator.cs b/src/Ocelot/Configuration/Creator/ServiceProviderConfigurationCreator.cs index 88137a8b..3b0ee225 100644 --- a/src/Ocelot/Configuration/Creator/ServiceProviderConfigurationCreator.cs +++ b/src/Ocelot/Configuration/Creator/ServiceProviderConfigurationCreator.cs @@ -13,7 +13,7 @@ namespace Ocelot.Configuration.Creator ? globalConfiguration?.ServiceDiscoveryProvider?.Type : "consul"; var pollingInterval = globalConfiguration?.ServiceDiscoveryProvider?.PollingInterval ?? 0; - var k8snamesapce = globalConfiguration?.ServiceDiscoveryProvider?.Namespace ?? string.Empty; + var k8snamespace = globalConfiguration?.ServiceDiscoveryProvider?.Namespace ?? string.Empty; return new ServiceProviderConfigurationBuilder() .WithHost(host) @@ -22,7 +22,7 @@ namespace Ocelot.Configuration.Creator .WithToken(globalConfiguration?.ServiceDiscoveryProvider?.Token) .WithConfigurationKey(globalConfiguration?.ServiceDiscoveryProvider?.ConfigurationKey) .WithPollingInterval(pollingInterval) - .WithNamesapce(k8snamesapce) + .WithNamespace(k8snamespace) .Build(); } } diff --git a/src/Ocelot/Configuration/ServiceProviderConfiguration.cs b/src/Ocelot/Configuration/ServiceProviderConfiguration.cs index 05ee07d4..86178c6e 100644 --- a/src/Ocelot/Configuration/ServiceProviderConfiguration.cs +++ b/src/Ocelot/Configuration/ServiceProviderConfiguration.cs @@ -10,7 +10,7 @@ Token = token; Type = type; PollingInterval = pollingInterval; - Namesapce = @namespace; + Namespace = @namespace; } public string Host { get; } @@ -25,6 +25,6 @@ public int PollingInterval { get; } - public string Namesapce { get; } + public string Namespace { get; } } } diff --git a/test/Ocelot.UnitTests/Configuration/ServiceProviderCreatorTests.cs b/test/Ocelot.UnitTests/Configuration/ServiceProviderCreatorTests.cs index fcf0c52a..2094a172 100644 --- a/test/Ocelot.UnitTests/Configuration/ServiceProviderCreatorTests.cs +++ b/test/Ocelot.UnitTests/Configuration/ServiceProviderCreatorTests.cs @@ -41,7 +41,7 @@ namespace Ocelot.UnitTests.Configuration .WithType("ServiceFabric") .WithToken("testtoken") .WithConfigurationKey("woo") - .WithNamesapce("default") + .WithNamespace("default") .Build(); this.Given(x => x.GivenTheFollowingGlobalConfig(globalConfig)) @@ -66,7 +66,7 @@ namespace Ocelot.UnitTests.Configuration _result.Port.ShouldBe(expected.Port); _result.Token.ShouldBe(expected.Token); _result.Type.ShouldBe(expected.Type); - _result.Namesapce.ShouldBe(expected.Namesapce); + _result.Namespace.ShouldBe(expected.Namespace); _result.ConfigurationKey.ShouldBe(expected.ConfigurationKey); } }