Controller
2017-02-14 10:15:40 0 举报
控制器(Controller)是一种用于控制和管理其他组件或系统的关键元素。它通常是一个硬件或软件设备,负责接收输入信号、处理这些信号并产生相应的输出。在计算机科学和工程领域,控制器可以是微处理器、微控制器或其他电子设备,用于实现对设备的精确控制。在家庭自动化系统中,控制器可以是一个智能家居中枢,通过无线通信技术控制各种家用电器。总之,控制器在许多领域都发挥着重要作用,确保系统的稳定运行和高效性能。
作者其他创作
大纲/内容
No
KubeCli kubernetes.Interface\tApiCli apiextensionsclient.Interface\t\ttrainingjobLister paddlelisters.TrainingJobLister\ttrainingjobSynced cache.InformerSynced\tjobtracker *sync.Map\tworkqueue workqueue.RateLimitingInterface\trecorder record.EventRecorder\tautoclean bool
c.workqueue.Done(key)
c.workqueue.AddRateLimited(key)
Starting trainingjob controller
Error syncing job
Err
Yes
Successfully synced
createCRD()
Controller
put into workqueue again
forget
Err== nil
WaitForCacheSync()
jobUpdater.UID() != job.ObjectMeta.UID
jobUpdater.Update(job)
job
return true
jobUpdaterObj
jobtracker:(job full name : job updater)
c.workqueue.Forget(key)
gc.cleanOrphanReplicaSets()# delete \"paddle-job-master\" and \"paddle-job-pserver\"gc.cleanOrphanBatchJobs()# delete \"paddle-job\"gc.CleanGarbagePods()
currentPhase = jobUpdater.GetJob().Status.Phase
True
wait.Until()
jobIsDeleted = false
Deleting TrainingJob
jobUpdater.Delete()
Fail
invalid key
currentPhase == Creating || running
jobUpdaterObj - JobUpdater
key
IsNotFound(Err)
OK
Err?
jobUpdater.Reconcile()
Starting workers
c.jobtracker.Delete(key)
False
jobIsDeleted = true
processNextWorkItem()
Exists?
c.workqueue.Get()
jobIsDeleted
NewGarbageCollector()CleanOrphans()
0 条评论
回复 删除
下一页