Two YAML files per service, and 171 workflows generated from them

The Kubernetes pipeline under our wireless services belongs to the platform team; what I hand-write is two files per service, and the sharpest failure in two years was a label Kubernetes refuses to let you change.

Containers

What is hand-written and what is generated

The deploy repository holds 24 services and almost no logic of its own. Each service is described by two hand-written files (meta-dev.yml and meta-prod.yml), and everything downstream is generated from them: 171 workflow files under .github/workflows, every one stamped # infra_core_managed to keep hands off. The manifests come out of a shared platform service I call and did not write (Deployment, HorizontalPodAutoscaler, PodDisruptionBudget, one kustomize overlay per cluster).

Of those 24 services, seven run on Kubernetes and twelve run as Docker containers on bare-metal hosts driven by Ansible. That split follows what each component needs, since an STP written in C wants a host and an Elixir API is happy in a pod.

ArgoCD is the same story. The infra team runs it and I operate it: checking whether an application is synced, reading pod logs when it is out of sync, forcing a resync when live state has drifted from the repo, redeploying when a resync alone fails to settle it. Operating a platform leaves no commits behind, and it is still most of what a deploy day consists of.

What the two files actually decide

For wireless-admin in production the meta file sets two instances, 200m CPU against a 300m limit, and 1024Mi of memory against 1536Mi, across two clusters (backend-site-a-prod and backend-site-b-prod) on preemptible nodes. The generated pod carries a maximum lifetime label (1week), so instances get recycled on a schedule; the PodDisruptionBudget holds minAvailable: 1 while that happens. The autoscaler it produces runs between one and two replicas (90% CPU, 80% memory) — a ceiling of two pods, not an elastic fleet.

One declaration in the repo is openly inert. wireless-manager asks for 40 instances with the autoscaler pinned shut (minInstances: 40, maxInstances: 40) and a Prometheus trigger on Kafka consumer-group lag above 300. The trigger is wired correctly; the bounds mean it can never move a replica.

The failure worth writing down

On 13 February 2026 the dev deploy of wireless-messaging-router stopped syncing in both clusters. Kustomize includeSelectors was adding env and site labels into spec.selector.matchLabels, which Kubernetes freezes once a Deployment exists — and both clusters already held that Deployment with one key in the selector (app). ArgoCD reported sync failures and nothing rolled.

The fix was to disable includeSelectors on that overlay (one line, no manifest surgery). The lesson is narrow and worth keeping: a label is cosmetic until it lands in a selector, and then it is schema.

Promotion, not rebuild

Dev PRs auto-merge; prod PRs wait for a human. The prod workflow merges meta-dev.yml over meta-prod.yml, validates that the image already exists in the prod registry namespace, then opens a PR for review. Production promotes what development already ran instead of building it again, which matters more than it sounds (the same Dockerfile twice gives you two digests). Merging demands three fields — change type, short title, description — and the helper exits if any is empty, because the orchestrator turns them into the Slack changelog and the release notes.

What verify had to be taught

The verify path reads the namespace out of the generated kustomization.yaml instead of carrying a hardcoded string, and reads the cluster contexts from k8s_clusters in the meta file; only then does it ask kubectl for running pods and their image tags. For host-deployed services it tries direct SSH first and falls back to the access manager's SSH config (~/.sdm/ssh_config). An earlier version shelled out to an internal CLI, which was longer and one step further from what is actually running.

Twenty-four services, two files each, 171 generated workflows. The one step I would leave manual is the prod merge.