Documentation
¶
Overview ¶
Package validate centralises input validation for cluster-facing seictl commands. Every side-effecting subcommand calls these helpers before any kubeconfig, AWS, or filesystem mutation.
The regex shapes and the deny-list match docs/design/cluster-cli.md §Input validation. Image validation is policy-only — it does not resolve references to digests; that lives in internal/aws.
Index ¶
Constants ¶
const ( AllowedRegistry = "189176372795.dkr.ecr.us-east-2.amazonaws.com" AllowedRepoPrefix = "sei/" BenchSizeSmall = "s" BenchSizeMedium = "m" BenchSizeLarge = "l" BenchDurationMin = 1 BenchDurationMax = 240 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error is a validation failure carrying the CLI category and message. Callers attach the exit code at the call site via ExitWith — validation owns the WHAT (this input is invalid, here is why); the caller owns the WHEN/WHERE (which verb is failing, hence which exit code).
func ChainID ¶
ChainID enforces a non-empty bech32-friendly chain identifier. Engineers usually pass the value emitted by `chain up`'s envelope.
func DurationMinutes ¶
func Image ¶
Image enforces the registry policy (ECR-only, sei/* prefix, tag or digest required). Digest resolution lives in internal/aws.
func Name ¶
Name validates a benchmark name and enforces the combined `bench-<alias>-<name>` chain-id stays within K8s' 63-char label cap.
func Namespace ¶
Namespace enforces RFC-1123 label shape. Convention enforcement (e.g. namespace = "eng-<alias>" for engineer cells) lives in `seictl onboard` — verbs read namespace verbatim from config so non-engineer flows can operate against arbitrary namespaces.