Documentation
¶
Overview ¶
Package workersync reconciles Kubernetes worker pods into the Worker registry behind the ateapi Control API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WorkerPodInformer ¶
func WorkerPodInformer(kc kubernetes.Interface) (informers.SharedInformerFactory, cache.SharedIndexInformer)
WorkerPodInformer creates a SharedInformerFactory and SharedIndexInformer for worker pods. The resync period re-delivers every cached pod as an update, so a registry record that drifted without a corresponding pod event is repaired on the next sweep.
Types ¶
type WorkerPoolSyncer ¶
type WorkerPoolSyncer struct {
// contains filtered or unexported fields
}
WorkerPoolSyncer reconciles the state of worker pods from Kubernetes Informer into the Worker registry, over the ateapi Control API.
Informer event handlers only enqueue keys; worker goroutines reconcile each key against the current informer cache state, requeuing with rate-limited backoff on transient failures such as a lost version precondition.
func NewWorkerPoolSyncer ¶
func NewWorkerPoolSyncer(client ateapipb.ControlClient, workerInformer cache.SharedIndexInformer, workerPoolLister listersv1alpha1.WorkerPoolLister) *WorkerPoolSyncer
NewWorkerPoolSyncer creates a new WorkerPoolSyncer.
func (*WorkerPoolSyncer) Start ¶
func (s *WorkerPoolSyncer) Start(ctx context.Context)
Start registers the event handlers and starts the background workers. The informer's initial list synthesizes Add events for every existing pod, so no explicit startup re-list is needed as long as Start is called before the informer factory is started.