Urgent.News

What's breaking now, across thousands of outlets.

Tech

What a Kubernetes controller actually does when you break something

⚡ TL;DR Four things about controller mechanics are widely half-understood: what Reconcile receives, where its work comes from, what a periodic resync is, and what a predicate turns off. I built an operator, broke it five ways, and measured each mechanism directly. The reconcile function runs in 2.71ms mean, 77/77 under 25ms , a short resync period costs zero additional API requests , and…

Kubernetes controllers maintain desired and observed state for resources, ensuring consistency between them. The Reconcile function executes this process, receiving only the namespace and name of the resource as input. It does not receive a diff. Instead, it reads the desired spec from scratch and hands it to controllerutil.CreateOrUpdate for comparison with the current state.

This level-triggered approach, as opposed to edge-triggered, ensures correct behavior regardless of missed updates. The work comes from four sources: Watch, Informer cache, Work queue, and Predicates. Watch establishes a long-lived HTTP connection to the API server, while Informer cache maintains local copies of watched objects.

Work queue holds keys to deduplicate Reconcile calls, and Predicates filter events before enqueuing keys. Understanding these four mechanisms reveals the true workings of Kubernetes controllers and how they affect performance and behavior.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

McKinley 1.0

Crackerjack new Mac app for creating and editing custom SF Symbols , from developer Amy Worrall: McKinley is an all-in-one studio for drawing and annotating SF Symbols.

Our site served every URL the same 3,780 bytes, and Google believed it

Checked with a Googlebot user agent one morning: every single URL on our site returned the same 3,780-byte shell. Same <title> , zero <h1> , zero body text.

  • Our site served identical 3,780-byte URLs for every page
  • Google treated this as if it were correct, marked unknown page
  • Fixed issues with rendering, duplicate content, and code bugs

Our regex found 199 records in a 1,723-record corpus and reported no errors

We maintain a corpus of 456 role-specific resume examples in TypeScript. Someone asked me what a good bullet point actually looks like, and rather than answer from taste I decided to measure the thing…

  • Regex algorithm identified 199 job descriptions in 1,723-record corpus
  • Twelve percent of data overlooked by regex script
  • Formatting issue corrected, expanding corpus to 1,723 description blocks

More from Monday 7 September →