Repository navigation
feat: revisions belong to whatever controls the ReplicaSet (ADR 0049) - #83
Merged
Merged
Conversation
ADR 0030 scoped revisions to Deployments, and what made a Deployment special was that the agent knew the name of its revision annotation — not anything about the object graph. An Argo Rollout creates and scales ordinary ReplicaSets, which the agent already lists, already resolves, and already reports as `workload_kind`. - Any ReplicaSet whose controller is a collected workload is reported. A bare ReplicaSet is not: it is the workload, not a revision of one. - The revision number is read for Deployments and no one else. Other controllers number under keys of their own, and no finding needs the number — ordering comes from `created_at`, which ships. Learning vendor keys would be a second list to keep in step with other people's releases. - `deployment_revisions` is renamed `workload_revisions`, spool file with it. The old name would be false the moment the first record arrived under another kind. No new RBAC, no new field, no new payload kind. StatefulSet and DaemonSet revisions stay uncollected, and the custom resource itself stays unread: this uses the object the agent was already watching. The e2e fixture is a ReplicaSet under a `Widget` kind that has no CRD in the cluster — a dangling owner reference survives the garbage collector and is exactly the shape Argo produces, without installing Argo. make test, lint, chart-lint: green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011YRKuL97KRndaopfpixrhp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADR 0030 scoped revisions to Deployments. What made a Deployment special was
that the agent knew the name of its revision annotation — not anything about the
object graph. An Argo Rollout creates and scales ordinary ReplicaSets, which the
agent already lists, already resolves, and already reports as
workload_kind.The only thing between those sets and the payload was a kind check.
Measured on kind (Kubernetes 1.36.1) against Argo Rollouts v1.10.0, mid-canary
with
setWeight: 25on four replicas:That is the shape ADR 0030 §2 already describes — two revisions with non-zero
counts is a rollout in flight, and the split is the weight it runs at. No new
field was needed to say it; it was never emitted.
What changed
is still inherited from the admitted pod index, so exclusions reach this
payload unchanged.
version of one, and its pods already resolve to the set itself.
controllers number under their own keys (
rollout.argoproj.io/revisionforArgo). No finding needs the number: deploy frequency needs ordering, which
created_atgives; which revision is live needs the replica counts, whichship; "this revision is that build" needs the image and the instant, which
ship. A table of vendor keys would be a second list to keep in step with other
people's releases.
deployment_revisions→workload_revisions, spool file with it. The oldname would be false the moment the first record arrived under another kind,
and a payload kind whose name contradicts its contents is what ADR 0022
exists to prevent. Free today, a protocol migration once a backend exists —
the reasoning ADR 0019 used to rename
go_dependencies.No new RBAC, no new field, no new payload kind. StatefulSet and DaemonSet
revisions stay uncollected (
controllerrevisions, declined by ADR 0030), andthe custom resource itself stays unread.
What this does not reach
Stated in the ADR so the widening is not read as more than it is: a
Rolloutpaused at a step and one degraded look identical from the ReplicaSets.
status.phaseandpauseConditionsare on the custom resource. This closes therevisions gap for Argo-managed workloads, not the rollout-state one.
The e2e needs no Argo
The fixture is a ReplicaSet under a
Widgetkind that has no CRD in thecluster. A dangling owner reference survives the garbage collector — verified —
and produces exactly the shape the code must handle, with no third-party
controller in the test matrix and no vendor name in the assertion.
Evidence
make test,make lint,make chart-lint: green.policy-e2eon kind:revisionHistoryLimitdefaults to 10 on a Rollout as on a Deployment, so thebound ADR 0030 leaned on to keep the snapshot small holds: with the limit set to
3, the cluster retained three historical sets plus the stable one plus the one
in flight.
🤖 Generated with Claude Code
https://claude.ai/code/session_011YRKuL97KRndaopfpixrhp