Skip to content

Disallow service names with dots #1208

@devdattakulkarni

Description

@devdattakulkarni

If we define a Service name with numbers in it, then the CRD registration fails with following error:

"status": "Error:The CustomResourceDefinition \"atomic1.0.16s.platformapi.kubeplus\" is invalid: \n* spec.names.plural: Invalid value: \"atomic1.0.16s\": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')\n* spec.names.singular: Invalid value: \"atomic1.0.16\": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')\n* spec.names.kind: Invalid value: \"Atomic1.0.16\": may have mixed case, but should otherwise match: a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')\n* spec.names.listKind: Invalid value: \"Atomic1.0.16List\": may have mixed case, but should otherwise match: a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')\n

We should disallow service names consisting of dots in them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions