Skip to content

Unify resources.ValidateActorID with the ValidateActorRef rules from #206 #216

Closed as not planned

Description

#206 (in review) adds DNS-1123 validators to internal/resources using k8s.io/apimachinery, including ValidateActorRef, which checks actor IDs with the same DNS-1123 label rule that the existing ValidateActorID implements with a hand-rolled regex. Once #206 merges, the package will contain two implementations of one rule, which can drift.

Unify them on a single implementation. This was deliberately kept out of #206 because it changes ate-api-server's client-facing error responses: ValidateActorID returns hand-written rule prose, while the apimachinery validators return generated messages, so the consolidation needs a decision about which error text API clients see.

While here, consider applying the other #206 validators (ValidateActorRef, ValidateRunscHash, ValidateSnapshotURIPrefix) at the API server and controller boundaries. Every one of these values originates in user-supplied API/CRD data, so bad values can be rejected at admission time instead of at actor-activation time deep in atelet.

Blocked on #206 merging.

Activity

  1. juli4n commented on Jun 10, 2026

    @juli4n
    Collaborator

    ValidateActorID intentionally avoids using k8s.io/apimachinery, this is because we need to expose both a validation function, and a regexp for valid IDs, which atenet uses for creating its DNS configuration. I think there is value in keeping both validation and the configuration in sync / using a single SoT.

  2. added
    kind/cleanup
    on Jun 10, 2026
  3. juli4n commented on Oct 7, 2026

    @juli4n
    Collaborator

    These methods are gone now that we moved validations to DV. Closing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/api-machinerykind/cleanup

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions