Machine generated stuff

This commit is contained in:
Brendan Burns
2016-03-09 20:06:31 -08:00
parent a0fcbd1495
commit 87a1635c93
14 changed files with 2848 additions and 457 deletions

View File

@@ -97,6 +97,8 @@ type Config struct {
KubeletClient kubeletclient.KubeletClient
// Used to start and monitor tunneling
Tunneler Tunneler
disableThirdPartyControllerForTesting bool
}
// Master contains state for a Kubernetes cluster master/api server.
@@ -124,6 +126,8 @@ type Master struct {
thirdPartyResources map[string]thirdPartyEntry
// protects the map
thirdPartyResourcesLock sync.RWMutex
// Useful for reliable testing. Shouldn't be used otherwise.
disableThirdPartyControllerForTesting bool
// Used to start and monitor tunneling
tunneler Tunneler
@@ -155,6 +159,8 @@ func New(c *Config) (*Master, error) {
enableCoreControllers: c.EnableCoreControllers,
deleteCollectionWorkers: c.DeleteCollectionWorkers,
tunneler: c.Tunneler,
disableThirdPartyControllerForTesting: c.disableThirdPartyControllerForTesting,
}
m.InstallAPIs(c)
@@ -698,12 +704,14 @@ func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage {
}
go func() {
wait.Forever(func() {
if m.disableThirdPartyControllerForTesting {
return
}
if err := thirdPartyControl.SyncResources(); err != nil {
glog.Warningf("third party resource sync failed: %v", err)
}
}, 10*time.Second)
}()
storage["thirdpartyresources"] = thirdPartyResourceStorage
}