tinycodinglm / sys /sys-0027.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 19)
034ba67 verified
|
Raw History Blame
1.3 kB
{"type": "session", "harness": "opencode", "id": "sys-0027", "name": "Kubernetes Informers and Watches"}
{"type": "message", "message": {"role": "system", "content": "You are an expert software engineer."}}
{"type": "message", "message": {"role": "user", "content": "How do Kubernetes informers and watches work?"}}
{"type": "message", "message": {"role": "assistant", "content": "Informers maintain a local cache of API server resources via watches.\n\nArchitecture:\n- SharedInformerFactory creates typed informers per resource\n- Each informer starts a long-running watch to the API server\n- Events (Add/Update/Delete) populate a Thread-Safe Store\n- Listers read from local cache (no API calls)\n- HasSynced() returns true when initial list is complete\n\nPattern:\n1. factory.Core().V1().Pods() -> SharedInformer\n2. informer.Informer().AddEventHandler(ResourceEventHandlerFuncs{...})\n3. informer.Lister().Pods(ns).Get(name) -- reads from cache\n4. WaitForCacheSync before processing\n\nTombstone handling: When a delete event is missed, the informer receives a DeletedFinalStateUnknown tombstone containing the last known object. Controllers must type-assert through this.\n\nCustom indexers: Controllers can register index functions for efficient lookups (e.g., by controller UID)."}}