mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 05:02:50 +00:00
Require a KubeletClient in master.New().
Without this, tests which create a master will panic with a nil pointer when the periodic podCache update runs. Deleted unused FakePodInfoGetter. Added FakeKubeletClient. Passed to master.New. Required a KubeletClient in master.New.
This commit is contained in:
@@ -206,6 +206,9 @@ func New(c *Config) *Master {
|
||||
boundPodFactory := &pod.BasicBoundPodFactory{
|
||||
ServiceRegistry: serviceRegistry,
|
||||
}
|
||||
if c.KubeletClient == nil {
|
||||
glog.Fatalf("master.New() called with config.KubeletClient == nil")
|
||||
}
|
||||
m := &Master{
|
||||
podRegistry: etcd.NewRegistry(c.EtcdHelper, boundPodFactory),
|
||||
controllerRegistry: etcd.NewRegistry(c.EtcdHelper, nil),
|
||||
|
Reference in New Issue
Block a user