mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-06-09 23:59:45 +00:00
c413b808f1
Real kubeconfig context names commonly contain characters the validator rejected: - 'admin@home', 'user@cluster.example.com' (kubectl rename, EKS aws-iam-authenticator) - 'cluster.example.com', 'gke_proj_zone_cluster.prod' (FQDN, GKE) - 'arn:aws:eks:us-east-1:123:cluster/foo' (EKS ARN) kubeconfig itself imposes no character restrictions, so requiring [a-zA-Z0-9_-] only was kportal-specific over-validation that blocked legitimate users. Widen the allowed set to add '@', '.', ':', '/'. Names must still start and end with a letter or digit so YAML specials and leading whitespace remain rejected. Tests cover the new positive cases and tighten negative coverage (starts-with-@, ends-with-/, ends-with-dot).