Skip to content

ate-setup: have EnsureCRDs create only the missing CRDs - #2585

Merged
Benjamin Elder (BenTheElder) merged 1 commit into
agent-substrate:mainfrom
HavenXia:ensure-crds-only-missing
Oct 14, 2026
Merged

Benjamin Elder (BenTheElder) merged 1 commit into
agent-substrate:mainfrom
HavenXia:ensure-crds-only-missing

Conversation

@HavenXia

@HavenXia Haven Xia (HavenXia) commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Component redeploys call EnsureCRDs. If any CRD on a hand-kept list was missing, it applied the whole generated directory: every CRD plus ate-controller's RBAC. A component redeploy could then update the existing CRDs and RBAC ahead of ate-controller. The list had also drifted and left out CSIDriverConfig.

Now:

  • EnsureCRDs creates only the missing CRDs. Existing CRDs and ate-controller's RBAC change only through DeployCRDs (deploy ate-system, deploy ate-controller).
  • Both read the CRDs from the generated directory, so the hand-kept list is gone.
  • On a fresh cluster, component commands no longer apply ate-controller's RBAC. Only ate-controller uses it, and deploy ate-controller applies it itself.

Part of #1686

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Component redeploys call EnsureCRDs. It checked a hand-kept list of two
CRDs, and if either was missing it applied the whole generated
directory: every CRD plus ate-controller's RBAC. That had two problems:

- Redeploying one component could rewrite the existing CRDs and the
  controller's RBAC as a side effect. In an upgrade to a release that
  adds a CRD to the list, `deploy atelet` would do this before
  ate-controller moves, although the upgrade runbook upgrades them
  together with ate-controller.
- The list had already drifted. It leaves out CSIDriverConfig, so
  `setup csi` did not restore that CRD when it was the only one
  missing, and then failed to create its CSIDriverConfig.

EnsureCRDs now checks every CRD in the generated directory and creates
only the missing ones. The existing CRDs and the RBAC change only
through DeployCRDs, which `deploy ate-system` and `deploy
ate-controller` run.

DeployCRDs now also waits on every CRD in the directory, so the list is
gone.
@BenTheElder
Benjamin Elder (BenTheElder) added this pull request to the merge queue Oct 14, 2026
Merged via the queue into agent-substrate:main with commit 61e2fd5 Oct 14, 2026
14 checks passed
@HavenXia
Haven Xia (HavenXia) deleted the ensure-crds-only-missing branch October 28, 2026 16:26
@HavenXia
Haven Xia (HavenXia) restored the ensure-crds-only-missing branch October 28, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants