fix(activity): use DNS-valid name for not-ready event rule#47
Merged
Conversation
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>
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.
Problem
All 12 inventory
ActivityPolicymanifests declare aneventRulesentry namednot_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:Observed impact (staging)
inventory-system/inventory-milo-activity-policiesFlux Kustomization stuck Ready=False (ReconciliationFailed) for ~2h.flux-system/inventoryKustomization flappingTrue → Unknownon every retry.FluxResourceNotReadyalerts. 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_ready→not-readyacross all 12 policies.Only the rule name changes. The
matchexpression's event-type annotation value (inventory.<kind>.not_ready) is the string the inventory controller actually emits and is intentionally left untouched.Validation
grepconfirms 0 remainingname: not_ready, all 12matchannotation values preserved.kustomize build config/components/milo-integration/succeeds.Once merged and the OCI artifact is published, Flux will re-apply cleanly and the
FluxResourceNotReadyalerts will clear.🤖 Generated with Claude Code