automation
Removing a task rather than documenting it.
-
Prometheus HTTP Service Discovery Backed by a Live Inventory
A static Prometheus targets file is correct on the day someone last edited it and wrong every day after that infrastructure changes. This walks through Prometheus's HTTP service discovery mechanism, backed by a live inventory rather than a file, with a complete example that runs on a laptop.
-
Separating 'Cannot Ever' From 'Currently Broken' in Sweep Automation
A sweep that checks a list of targets for a feature has to decide what a failure means, and a response code alone cannot tell it whether that failure was expected or is a regression. Here is how to make that decision explicit, keep it loud when it should be, and test it so the escape hatch does not become a second way to hide problems.
-
ApplicationSets: Onboarding a Workload With a Directory and a Pull Request
Hand-writing a new Argo CD Application object for every microservice is repetitive, and the step is easy to forget entirely when a new service is added. This shows how an ApplicationSet's git directory generator turns onboarding a workload into adding a directory and merging a pull request, with a complete, reproducible setup on a local kind cluster.
-
Argo CD App-of-Apps: Bootstrapping a Bare Cluster from One Root Application
A fresh Kubernetes cluster has nothing on it, and a runbook of kubectl apply commands run in the right order does not survive being handed to someone else or run against a rebuilt cluster months later. This works through the app-of-apps pattern, where one root Argo CD Application manages every other Application, and gives a complete, reproducible setup on a local kind cluster.
-
Building the Dry-Run Path First, and Testing That It Sends Nothing
A dry-run flag added after the real logic is written tends to fall out of sync as the real path grows new side effects nobody remembers to gate. This describes structuring a tool so planning and execution are separate from the start, and writing a test that proves dry-run mode sends nothing.
-
Managing a Shared DNS Zone Through a Replace-Everything API
Many registrar and DNS provider APIs expose only "replace the whole zone", with no way to add or remove a single record, so naive automation that computes its desired records and pushes them deletes every record it does not know about. This builds a read-merge-write client with an ownership marker that tells apart managed and unmanaged records, backed by a small local test server so the whole pattern can be run and verified without any real registrar.
-
A Python CLI That Scaffolds a Project Structure You Actually Want
Starting a new service usually means recreating the same src layout, Dockerfile and ignore rules by hand, or copying them from whichever previous project is open in another tab, drifting a little further from a consistent shape each time. This builds a small, dependency-free scaffolding CLI that generates a project from a fixed template, and a test that checks the result is actually valid.
-
Replacing pip, venv, flake8, black and isort with uv and Ruff
A requirements.txt file records no lockfile, so "pip install -r requirements.txt" can resolve a different dependency tree on two machines run a day apart, and four separate lint tools mean four configuration blocks that drift out of sync. This walks through replacing pip, venv, flake8, black and isort with uv and Ruff, with a project a reader can build and lint in a few minutes.