Skip to content

fix(milo-integration): stop shipping ActivityPolicies to infra clusters#46

Merged
scotwells merged 1 commit into
mainfrom
fix/milo-integration-drop-activity-policies
Jun 17, 2026
Merged

fix(milo-integration): stop shipping ActivityPolicies to infra clusters#46
scotwells merged 1 commit into
mainfrom
fix/milo-integration-drop-activity-policies

Conversation

@scotwells

@scotwells scotwells commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Inventory's ActivityPolicies were being applied to the wrong cluster, stalling Flux on the Datum infra clusters for ~2 weeks.

The milo-integration component wires the controller into Milo, but it was also bundling 12 ActivityPolicy resources. Those need the activity.miloapis.com CRDs, which only exist on the Milo control plane — so every infra-cluster reconcile failed with no matches for kind "ActivityPolicy" and got stuck in a retry loop.

This drops the policies from milo-integration so it carries only the controller's Milo-wiring patches. The policies stay in config/milo and are applied directly to Milo by a dedicated Flux Kustomization (infra datum-cloud/infra#2737).

Verified: infra-facing build emits 0 policies and keeps all controller volumes; config/milo/activity/policies still emits all 12.

🤖 Generated with Claude Code

The milo-integration component wires the inventory controller into a Milo
control plane and is consumed by the infra-cluster Flux Kustomization
(inventory-manager). It was also pulling in the 12 ActivityPolicy resources
via `components: - ../../milo`.

ActivityPolicies require the activity.miloapis.com CRDs, which are served
only by the Milo control plane's activity-system aggregated apiserver — not
the infra cluster. Every infra-cluster dry-run therefore failed with
`no matches for kind "ActivityPolicy" in version "activity.miloapis.com/v1alpha1"`,
leaving the Kustomization stuck in a failing retry loop.

Drop the `components: - ../../milo` entry so milo-integration carries only
the controller's Milo-wiring patches. The policies remain in config/milo and
are applied directly to the Milo control plane by a dedicated Flux
Kustomization.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scotwells scotwells requested a review from ecv June 17, 2026 20:55

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh well that's cool. But I was able to ship infra releases during this time, which wouldn't have been possible if Flux was stalled! A bit confused as to the effect of this mistake.

@scotwells

Copy link
Copy Markdown
Contributor Author

@ecv may have only broke after the configs were added in? Looks like it hasn't successfully reconciled and deployed a new version since 6/4

@scotwells scotwells merged commit ab20a92 into main Jun 17, 2026
3 checks passed
@scotwells scotwells deleted the fix/milo-integration-drop-activity-policies branch June 17, 2026 22:01
@scotwells

scotwells commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@ecv FYI getting this error now that this is being applied to Milo's API correctly:

ActivityPolicy/milo-system/inventory.miloapis.com-cluster dry-run failed (Invalid): ActivityPolicy.activity.miloapis.com "inventory.miloapis.com-cluster" is invalid: spec.eventRules[1].name: Invalid value: "not_ready": must be a valid DNS subdomain (lowercase alphanumeric and hyphens, start/end with alphanumeric): [a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants