本文整理汇总了Golang中k8s/io/kubernetes/cmd/kube-controller-manager/app.ResyncPeriod函数的典型用法代码示例。如果您正苦于以下问题:Golang ResyncPeriod函数的具体用法?Golang ResyncPeriod怎么用?Golang ResyncPeriod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ResyncPeriod函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: RunDeploymentController
func (c *MasterConfig) RunDeploymentController(client *client.Client) {
controller := deployment.NewDeploymentController(
clientadapter.FromUnversionedClient(client),
kctrlmgr.ResyncPeriod(c.ControllerManager),
)
go controller.Run(int(c.ControllerManager.ConcurrentDeploymentSyncs), utilwait.NeverStop)
}
示例2: RunDeploymentController
func (c *MasterConfig) RunDeploymentController(client *kclientset.Clientset) {
controller := deployment.NewDeploymentController(
client,
kctrlmgr.ResyncPeriod(c.ControllerManager),
)
go controller.Run(int(c.ControllerManager.ConcurrentDeploymentSyncs), utilwait.NeverStop)
}
示例3: RunDaemonSetsController
func (c *MasterConfig) RunDaemonSetsController(client *client.Client) {
controller := daemon.NewDaemonSetsController(
clientadapter.FromUnversionedClient(client),
kctrlmgr.ResyncPeriod(c.ControllerManager),
c.ControllerManager.LookupCacheSizeForDaemonSet,
)
go controller.Run(c.ControllerManager.ConcurrentDaemonSetSyncs, utilwait.NeverStop)
}
示例4: RunReplicaSetController
func (c *MasterConfig) RunReplicaSetController(client *client.Client) {
controller := replicasetcontroller.NewReplicaSetController(
clientadapter.FromUnversionedClient(client),
kctrlmgr.ResyncPeriod(c.ControllerManager),
replicasetcontroller.BurstReplicas,
int(c.ControllerManager.LookupCacheSizeForRC),
)
go controller.Run(int(c.ControllerManager.ConcurrentRSSyncs), utilwait.NeverStop)
}
示例5: RunReplicationController
// RunReplicationController starts the Kubernetes replication controller sync loop
func (c *MasterConfig) RunReplicationController(client *client.Client) {
controllerManager := replicationcontroller.NewReplicationManager(
internalclientset.FromUnversionedClient(client),
kctrlmgr.ResyncPeriod(c.ControllerManager),
replicationcontroller.BurstReplicas,
c.ControllerManager.LookupCacheSizeForRC,
)
go controllerManager.Run(c.ControllerManager.ConcurrentRCSyncs, utilwait.NeverStop)
}
示例6: RunDaemonSetsController
func (c *MasterConfig) RunDaemonSetsController(client *kclientset.Clientset) {
controller := daemon.NewDaemonSetsController(
c.Informers.Pods().Informer(),
client,
kctrlmgr.ResyncPeriod(c.ControllerManager),
int(c.ControllerManager.LookupCacheSizeForDaemonSet),
)
go controller.Run(int(c.ControllerManager.ConcurrentDaemonSetSyncs), utilwait.NeverStop)
}
示例7: RunReplicationController
// RunReplicationController starts the Kubernetes replication controller sync loop
func (c *MasterConfig) RunReplicationController(client *client.Client) {
controllerManager := replicationcontroller.NewReplicationManager(
c.Informers.Pods().Informer(),
clientadapter.FromUnversionedClient(client),
kctrlmgr.ResyncPeriod(c.ControllerManager),
replicationcontroller.BurstReplicas,
int(c.ControllerManager.LookupCacheSizeForRC),
c.ControllerManager.EnableGarbageCollector,
)
go controllerManager.Run(int(c.ControllerManager.ConcurrentRCSyncs), utilwait.NeverStop)
}
示例8: RunReplicaSetController
func (c *MasterConfig) RunReplicaSetController(client *kclientset.Clientset) {
controller := replicasetcontroller.NewReplicaSetController(
c.Informers.Pods().Informer(),
client,
kctrlmgr.ResyncPeriod(c.ControllerManager),
replicasetcontroller.BurstReplicas,
int(c.ControllerManager.LookupCacheSizeForRC),
c.ControllerManager.EnableGarbageCollector,
)
go controller.Run(int(c.ControllerManager.ConcurrentRSSyncs), utilwait.NeverStop)
}
示例9: RunResourceQuotaManager
// RunResourceQuotaManager starts the resource quota manager
func (c *MasterConfig) RunResourceQuotaManager() {
client := clientadapter.FromUnversionedClient(c.KubeClient)
resourceQuotaRegistry := quotainstall.NewRegistry(client)
groupKindsToReplenish := []unversioned.GroupKind{
kapi.Kind("Pod"),
kapi.Kind("Service"),
kapi.Kind("ReplicationController"),
kapi.Kind("PersistentVolumeClaim"),
kapi.Kind("Secret"),
kapi.Kind("ConfigMap"),
}
resourceQuotaControllerOptions := &kresourcequota.ResourceQuotaControllerOptions{
KubeClient: client,
ResyncPeriod: controller.StaticResyncPeriodFunc(c.ControllerManager.ResourceQuotaSyncPeriod.Duration),
Registry: resourceQuotaRegistry,
GroupKindsToReplenish: groupKindsToReplenish,
ControllerFactory: kresourcequota.NewReplenishmentControllerFactory(c.Informers.Pods().Informer(), client),
ReplenishmentResyncPeriod: kctrlmgr.ResyncPeriod(c.ControllerManager),
}
go kresourcequota.NewResourceQuotaController(resourceQuotaControllerOptions).Run(int(c.ControllerManager.ConcurrentResourceQuotaSyncs), utilwait.NeverStop)
}
示例10: RunResourceQuotaManager
// RunResourceQuotaManager starts resource quota controller for OpenShift resources
func (c *MasterConfig) RunResourceQuotaManager(cm *cmapp.CMServer) {
concurrentResourceQuotaSyncs := defaultConcurrentResourceQuotaSyncs
resourceQuotaSyncPeriod := defaultResourceQuotaSyncPeriod
replenishmentSyncPeriodFunc := controller.StaticResyncPeriodFunc(defaultReplenishmentSyncPeriod)
if cm != nil {
// TODO: should these be part of os master config?
concurrentResourceQuotaSyncs = cm.ConcurrentResourceQuotaSyncs
resourceQuotaSyncPeriod = cm.ResourceQuotaSyncPeriod.Duration
replenishmentSyncPeriodFunc = kctrlmgr.ResyncPeriod(cm)
}
osClient, kClient := c.ResourceQuotaManagerClients()
resourceQuotaRegistry := quota.NewRegistry(osClient, false)
resourceQuotaControllerOptions := &kresourcequota.ResourceQuotaControllerOptions{
KubeClient: kClient,
ResyncPeriod: controller.StaticResyncPeriodFunc(resourceQuotaSyncPeriod),
Registry: resourceQuotaRegistry,
GroupKindsToReplenish: []unversioned.GroupKind{imageapi.Kind("ImageStream")},
ControllerFactory: quotacontroller.NewReplenishmentControllerFactory(osClient),
ReplenishmentResyncPeriod: replenishmentSyncPeriodFunc,
}
go kresourcequota.NewResourceQuotaController(resourceQuotaControllerOptions).Run(concurrentResourceQuotaSyncs, utilwait.NeverStop)
}
示例11: RunPetSetController
// RunPetSetController starts the PetSet controller
func (c *MasterConfig) RunPetSetController(client *client.Client) {
ps := petsetcontroller.NewPetSetController(c.Informers.Pods().Informer(), client, kctrlmgr.ResyncPeriod(c.ControllerManager)())
go ps.Run(1, utilwait.NeverStop)
}
示例12: RunJobController
// RunJobController starts the Kubernetes job controller sync loop
func (c *MasterConfig) RunJobController(client *client.Client) {
controller := jobcontroller.NewJobController(internalclientset.FromUnversionedClient(client), kctrlmgr.ResyncPeriod(c.ControllerManager))
go controller.Run(c.ControllerManager.ConcurrentJobSyncs, utilwait.NeverStop)
}
示例13: RunReplicationController
// RunReplicationController starts the Kubernetes replication controller sync loop
func (c *MasterConfig) RunReplicationController(client *client.Client) {
controllerManager := replicationcontroller.NewReplicationManager(client, kctrlmgr.ResyncPeriod(c.ControllerManager), replicationcontroller.BurstReplicas)
go controllerManager.Run(c.ControllerManager.ConcurrentRCSyncs, util.NeverStop)
}
示例14: RunGCController
// RunGCController handles deletion of terminated pods.
func (c *MasterConfig) RunGCController(client *client.Client) {
if c.ControllerManager.TerminatedPodGCThreshold > 0 {
gcController := gccontroller.New(clientadapter.FromUnversionedClient(client), kctrlmgr.ResyncPeriod(c.ControllerManager), int(c.ControllerManager.TerminatedPodGCThreshold))
go gcController.Run(utilwait.NeverStop)
}
}
示例15: RunJobController
// RunJobController starts the Kubernetes job controller sync loop
func (c *MasterConfig) RunJobController(client *client.Client) {
controller := jobcontroller.NewJobController(client, kctrlmgr.ResyncPeriod(c.ControllerManager))
go controller.Run(c.ControllerManager.ConcurrentJobSyncs, util.NeverStop)
}