mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 21:25:09 +00:00
Sync node status from node controller to master.
This commit is contained in:
@@ -68,7 +68,6 @@ type Config struct {
|
||||
Client *client.Client
|
||||
Cloud cloudprovider.Interface
|
||||
EtcdHelper tools.EtcdHelper
|
||||
HealthCheckMinions bool
|
||||
EventTTL time.Duration
|
||||
MinionRegexp string
|
||||
KubeletClient client.KubeletClient
|
||||
@@ -235,7 +234,7 @@ func setDefaults(c *Config) {
|
||||
// any unhandled paths to "Handler".
|
||||
func New(c *Config) *Master {
|
||||
setDefaults(c)
|
||||
minionRegistry := makeMinionRegistry(c)
|
||||
minionRegistry := etcd.NewRegistry(c.EtcdHelper, nil)
|
||||
serviceRegistry := etcd.NewRegistry(c.EtcdHelper, nil)
|
||||
boundPodFactory := &pod.BasicBoundPodFactory{
|
||||
ServiceRegistry: serviceRegistry,
|
||||
@@ -330,15 +329,6 @@ func logStackOnRecover(panicReason interface{}, httpWriter http.ResponseWriter)
|
||||
glog.Errorln(buffer.String())
|
||||
}
|
||||
|
||||
func makeMinionRegistry(c *Config) minion.Registry {
|
||||
var minionRegistry minion.Registry = etcd.NewRegistry(c.EtcdHelper, nil)
|
||||
// TODO: plumb in nodeIPCache here
|
||||
if c.HealthCheckMinions {
|
||||
minionRegistry = minion.NewHealthyRegistry(minionRegistry, c.KubeletClient, util.RealClock{}, 20*time.Second)
|
||||
}
|
||||
return minionRegistry
|
||||
}
|
||||
|
||||
// init initializes master.
|
||||
func (m *Master) init(c *Config) {
|
||||
var userContexts = handlers.NewUserRequestContext()
|
||||
|
Reference in New Issue
Block a user