Merge pull request #5854 from fgrzadkowski/delete_pod_cache
Delete pod_cache and rely on updating pod status by kublet.
This commit is contained in:
@@ -115,9 +115,6 @@ type Config struct {
|
||||
|
||||
// The name of the cluster.
|
||||
ClusterName string
|
||||
|
||||
// If true we will periodically probe pods statuses.
|
||||
SyncPodStatus bool
|
||||
}
|
||||
|
||||
// Master contains state for a Kubernetes cluster master/api server.
|
||||
@@ -372,20 +369,6 @@ func (m *Master) init(c *Config) {
|
||||
m.nodeRegistry = registry
|
||||
|
||||
nodeStorage := minion.NewStorage(m.nodeRegistry, c.KubeletClient)
|
||||
// TODO: unify the storage -> registry and storage -> client patterns
|
||||
nodeStorageClient := RESTStorageToNodes(nodeStorage)
|
||||
podCache := NewPodCache(
|
||||
c.KubeletClient,
|
||||
nodeStorageClient.Nodes(),
|
||||
podRegistry,
|
||||
)
|
||||
|
||||
if c.SyncPodStatus {
|
||||
go util.Forever(podCache.UpdateAllContainers, m.cacheTimeout)
|
||||
go util.Forever(podCache.GarbageCollectPodStatus, time.Minute*30)
|
||||
// Note the pod cache needs access to an un-decorated RESTStorage
|
||||
podStorage = podStorage.WithPodStatus(podCache)
|
||||
}
|
||||
|
||||
controllerStorage := controlleretcd.NewREST(c.EtcdHelper)
|
||||
|
||||
|
Reference in New Issue
Block a user