operator-registry
operator-registry copied to clipboard
Channel names should have stricter validation
To get closer to Kubernetes name validation conventions, opm validate should ensure that channel names are:
- No longer than 63 characters (follows the RFC 1123 DNS Label pattern that Kubernetes follows)
- Match the regular expression
^[a-z0-9]([\._\-a-z0-9]*[a-z0-9])?$(RFC 1123 DNS Label pattern + the allowance of.and_characters)
Following the above validations, we get significantly closer to the name validation conventions that Kubernetes uses and as such aligns us closer to the Kubernetes ecosystem.
The above validations are met by all known channel names except for one in the Red Hat certified operator index that looks like an unintentional channel name. This gist was used to verify these validations: https://gist.github.com/everettraven/4691c8cc6181f28b129f46cceeb602b5