01 · The weekly walk
Every YAML file, every Monday morning.
The naming review runs once a week. For each configured repository
it lists every YAML file and parses what is actually inside: the
kind, the name and the namespace of each document.
In apps/shop/orders-api/ it finds three files whose
names say nothing about their content.
02 · Why names matter here
Names are how related files find each other.
The convention is <kind>_<identifier>[-qualifier].yaml,
for example deployment_orders-api.yaml. It is not just
tidiness: the repository scanner batches files that share an
identifier, so a Deployment and its autoscaler are analysed in the
same context and a fix can touch both.
autoscale.yaml shares nothing with app.yaml,
so today they are looked at apart.
03 · Suggest the names
A model proposes, as a structured list.
The model sees the parsed summary of every file in the directory
and returns a list of from → to pairs, each with a
confidence. Low-confidence suggestions are dropped.
It also flags files sitting in a flat root that belong in a
subdirectory, and resources of one application named
inconsistently. None of this is applied yet: every suggestion now
has to pass deterministic checks.
04 · Grounded in the file, not its neighbours
Every part of the new name must come from the file itself.
Each token of a proposed name has to be explained by the file it
renames: a word from its current name, a Kubernetes kind, or a word
from a metadata.name inside it. A token borrowed from a
neighbouring file is rejected.
The kind prefix must match the file's actual kind too. A CloudNativePG
Cluster is not a statefulset_, however
familiar that word is.
05 · What is left alone
Some renames are not worth making, or not safe to make.
- A file holding several resources is never squeezed into a single-kind name.
- Two files that would land on the same new name: both are dropped, a human picks.
- Vendored bundles (upstream install manifests) are recognised by content and skipped.
- Directories without a
kustomization.yaml are left alone: Flux reads every file there anyway, so a rename is pure churn.
- A skip annotation on the file opts it out for good.
06 · One directory, one MR
Renames land together, or the directory gets worse.
Merging renames one file at a time leaves a directory half in the
old style and half in the new. Suggestions in the same directory
that make the same kind of change are grouped into a single
proposal, so the directory is uniform the moment it merges.
07 · Rewrite every reference
A rename that breaks kustomize build is not a rename.
Every kustomization.yaml that names the old file is
rewritten in the same diff. Afterwards the result is parsed again
across every reference field kustomize knows (resources, patches,
generators and more) to prove the old name is gone.
If a reference has a shape the rewriter cannot edit safely, such as
a flow-style list or a generator's files: entry, the
proposal is held as NEEDS_REVIEW with high risk, naming the
exact reference to rewire by hand.
08 · The proposal
Three renames, one kustomization patch, zero content changes.
The MR moves files and edits references, nothing else. Merge it and
Flux applies exactly the same objects as before. The full MR is
below.