Adding a leaf to someone else's infrastructure repository

What it is like to contribute scrape configuration to a monitoring repository you do not own, across one layout change and one deprecation.

Infra

Where a scrape job lives

The infrastructure team designed this repository and runs it. My contribution is scrape configuration and nothing else — four pull requests between December 2024 and February 2026 (#297, #365, #414, #516), each adding targets so that services I was responsible for showed up in metrics someone else collected.

In 2024 the file was a Go template, one per cluster:

releases/common/prometheus-main/<cluster>/scrapeconfigs.yaml.go.tmpl

That one file was 3,796 lines in December 2024 and 3,993 by July 2025 (197 lines in seven months, almost none of them mine), carrying 90 job_name: entries for a single cluster. Helmfile rendered it; Helm installed the result; a change to it was a diff of three to thirty lines against four thousand. The practical effect of that shape is worth saying plainly. Nobody reads a four-thousand-line template, so you search it, find the nearest job that resembles yours, and copy its shape (interval, timeout, label block, all of it). Consistency comes from imitation, not from structure.

The layout changed under me

By my February 2026 commits the Go template path had gone. In its place were 21 kustomize overlay directories (one per Prometheus instance):

prometheus-main/prod/overlays/<instance>/<cluster>/extra-scrapes.yaml

Nineteen of the 21 carried an extra-scrapes.yaml, and the two I edited were 76 and 340 lines — small enough to read end to end, which is the real improvement. Nobody told me the layout had moved; I found out by looking for the file I had edited the previous July (same repository, same branch) and failing to find it.

Overlays do not inherit each other, so a job wanted at two sites is written twice. One commit added six jobs to one overlay and four to another, by hand, with the same metrics_path and the same scrape_interval in both. Ten jobs, two files, one ticket (ENGDESK-49105).

What a contributor learns that the author does not

Three things, all about the gap between a template and the person editing it.

A generated file has no owner you can ask. The Go template was the output of conventions set before I arrived, and the conventions lived in the file itself instead of in a schema — so my only validation was a reviewer (no schema, no linter I could run locally), and the reviewer was the person who had written the other 3,900 lines.

Layering helps the author more than the contributor. Base plus override is the right design, and the thing I need to change is always the override (the layer with the least documentation, by construction).

A deprecation is a layout change you cannot ignore. In May 2026 the repository was marked deprecated for Prometheus and Alertmanager changes, and the production manifests moved to a repository managed by Argo CD. Nine commits on 26 May removed the migrated slices — overlays, values files, scrape files, a 1,264-line alerts file, and the whole Alertmanager tree (base values 682 lines, prod common 295) — leaving a repository whose README is now mostly a warning.

What survived

Every scrape job I added is gone from that repository. The configuration was migrated, so those targets are still scraped from somewhere else (a repository I have no commits in); the commits are now history of a deprecated repository. That is the honest shape of the work. I wrote no infrastructure-as-code here — I wrote leaves on someone else's tree, and they lasted exactly as long as the tree did.