當前位置: 首頁>>代碼示例>>Golang>>正文


Golang app.ResyncPeriod函數代碼示例

本文整理匯總了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)
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:7,代碼來源:master.go

示例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)
}
開發者ID:LalatenduMohanty,項目名稱:origin,代碼行數:7,代碼來源:master.go

示例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)
}
開發者ID:RomainVabre,項目名稱:origin,代碼行數:8,代碼來源:master.go

示例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)
}
開發者ID:rawlingsj,項目名稱:gofabric8,代碼行數:9,代碼來源:master.go

示例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)
}
開發者ID:jwforres,項目名稱:origin,代碼行數:10,代碼來源:master.go

示例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)
}
開發者ID:LalatenduMohanty,項目名稱:origin,代碼行數:9,代碼來源:master.go

示例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)
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:12,代碼來源:master.go

示例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)
}
開發者ID:LalatenduMohanty,項目名稱:origin,代碼行數:11,代碼來源:master.go

示例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)
}
開發者ID:rhamilto,項目名稱:origin,代碼行數:22,代碼來源:master.go

示例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)
}
開發者ID:RomainVabre,項目名稱:origin,代碼行數:24,代碼來源:run_components.go

示例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)
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:5,代碼來源:master.go

示例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)
}
開發者ID:richm,項目名稱:origin,代碼行數:5,代碼來源:master.go

示例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)
}
開發者ID:zhangpeihao,項目名稱:origin,代碼行數:5,代碼來源:master.go

示例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)
	}
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:7,代碼來源:master.go

示例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)
}
開發者ID:zhangpeihao,項目名稱:origin,代碼行數:5,代碼來源:master.go


注:本文中的k8s/io/kubernetes/cmd/kube-controller-manager/app.ResyncPeriod函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。