Skip to content

fix(activity): use DNS-valid name for not-ready event rule#47

Merged
ecv merged 1 commit into
mainfrom
fix/activity-policy-eventrule-name-dns-valid
Jun 18, 2026
Merged

fix(activity): use DNS-valid name for not-ready event rule#47
ecv merged 1 commit into
mainfrom
fix/activity-policy-eventrule-name-dns-valid

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

Problem

All 12 inventory ActivityPolicy manifests declare an eventRules entry named not_ready. That name is not a valid RFC 1123 DNS subdomain (underscores are disallowed), so the activity apiserver rejects every policy on server-side dry-run:

ActivityPolicy "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)

Observed impact (staging)

  • inventory-system/inventory-milo-activity-policies Flux Kustomization stuck Ready=False (ReconciliationFailed) for ~2h.
  • Parent flux-system/inventory Kustomization flapping True → Unknown on every retry.
  • A stream of noisy FluxResourceNotReady alerts. The rotating error message (it fails on a different policy each reconcile — -cluster, -link, -circuit, -cable, …) made it look like many failures; it's this one root cause.

Fix

Rename the event rule not_readynot-ready across all 12 policies.

Only the rule name changes. The match expression's event-type annotation value (inventory.<kind>.not_ready) is the string the inventory controller actually emits and is intentionally left untouched.

Validation

  • grep confirms 0 remaining name: not_ready, all 12 match annotation values preserved.
  • kustomize build config/components/milo-integration/ succeeds.

Once merged and the OCI artifact is published, Flux will re-apply cleanly and the FluxResourceNotReady alerts will clear.

🤖 Generated with Claude Code

The `not_ready` eventRules[].name in the inventory ActivityPolicies is
not a valid RFC 1123 DNS subdomain (underscores are disallowed), so the
activity apiserver rejects every one of these policies on server-side
dry-run:

  ActivityPolicy "inventory.miloapis.com-cluster" is invalid:
  spec.eventRules[1].name: Invalid value: "not_ready": must be a valid
  DNS subdomain ...

This kept the `inventory-milo-activity-policies` Flux Kustomization stuck
Ready=False in staging, flapping the parent `inventory` Kustomization and
firing a stream of FluxResourceNotReady alerts.

Rename the rule to `not-ready` across all 12 inventory policies. Only the
rule name changes; the `match` event-type annotation value
(`inventory.<kind>.not_ready`) is the string the controller actually
emits and is left untouched.

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

@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.

ha

@ecv ecv merged commit 634d13c into main Jun 18, 2026
3 checks passed
@ecv ecv deleted the fix/activity-policy-eventrule-name-dns-valid branch June 18, 2026 03:49
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