kubernetes provider (#772)

* feat: Kubernetes ServiceDiscoveryProvider

* 编写k8s测试例子

* feat:fix kube config

* feat: remove port

* feat : complete the k8s test

* feat :  add kubeserviceDiscovery test

* feat : add kube provider unittest

* feat :add kubetnetes docs

how to use ocelot with kubetnetes docs

* keep the configuration as simple as possible, no qos, no cache

* fix: use http

* add PollingKubeServiceDiscovery

* feat : refactor logger

* feat : add  pollkube docs

* feat:Remove unnecessary code

* feat : code-block json
This commit is contained in:
geffzhang
2019-01-31 18:19:32 +08:00
committed by Marcelo Castagna
parent 05ede70e62
commit 44dccf1fce
42 changed files with 1135 additions and 7 deletions

View File

@ -30,7 +30,8 @@ namespace Ocelot.UnitTests.Configuration
Port = 1234,
Type = "ServiceFabric",
Token = "testtoken",
ConfigurationKey = "woo"
ConfigurationKey = "woo",
Namespace ="default"
}
};
@ -40,13 +41,14 @@ namespace Ocelot.UnitTests.Configuration
.WithType("ServiceFabric")
.WithToken("testtoken")
.WithConfigurationKey("woo")
.WithNamesapce("default")
.Build();
this.Given(x => x.GivenTheFollowingGlobalConfig(globalConfig))
.When(x => x.WhenICreate())
.Then(x => x.ThenTheConfigIs(expected))
.BDDfy();
}
}
private void GivenTheFollowingGlobalConfig(FileGlobalConfiguration fileGlobalConfig)
{
@ -64,6 +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.ConfigurationKey.ShouldBe(expected.ConfigurationKey);
}
}