mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #5430 from wojtek-t/remove_etcd_references_from_replication_controllers
Remove etcd references from ReplicationController
This commit is contained in:
commit
27c51ee6f5
@ -138,7 +138,7 @@ func (rm *ReplicationManager) watchControllers(resourceVersion *string) {
|
|||||||
case event, open := <-watching.ResultChan():
|
case event, open := <-watching.ResultChan():
|
||||||
if !open {
|
if !open {
|
||||||
// watchChannel has been closed, or something else went
|
// watchChannel has been closed, or something else went
|
||||||
// wrong with our etcd watch call. Let the util.Forever()
|
// wrong with our watch call. Let the util.Forever()
|
||||||
// that called us call us again.
|
// that called us call us again.
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -30,10 +30,8 @@ import (
|
|||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools"
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
|
||||||
"github.com/coreos/go-etcd/etcd"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func makeNamespaceURL(namespace, suffix string) string {
|
func makeNamespaceURL(namespace, suffix string) string {
|
||||||
@ -250,22 +248,6 @@ func TestSynchronize(t *testing.T) {
|
|||||||
"type": "production",
|
"type": "production",
|
||||||
}
|
}
|
||||||
|
|
||||||
fakeEtcd := tools.NewFakeEtcdClient(t)
|
|
||||||
fakeEtcd.Data["/registry/controllers"] = tools.EtcdResponseWithError{
|
|
||||||
R: &etcd.Response{
|
|
||||||
Node: &etcd.Node{
|
|
||||||
Nodes: []*etcd.Node{
|
|
||||||
{
|
|
||||||
Value: runtime.EncodeOrDie(testapi.Codec(), &controllerSpec1),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Value: runtime.EncodeOrDie(testapi.Codec(), &controllerSpec2),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
fakePodHandler := util.FakeHandler{
|
fakePodHandler := util.FakeHandler{
|
||||||
StatusCode: 200,
|
StatusCode: 200,
|
||||||
ResponseBody: "{\"apiVersion\": \"" + testapi.Version() + "\", \"kind\": \"PodList\"}",
|
ResponseBody: "{\"apiVersion\": \"" + testapi.Version() + "\", \"kind\": \"PodList\"}",
|
||||||
|
Loading…
Reference in New Issue
Block a user