Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Endpoint fails to create if namespace starts with a number #4933

Open
ctron opened this issue Jul 9, 2020 · 0 comments
Open

Endpoint fails to create if namespace starts with a number #4933

ctron opened this issue Jul 9, 2020 · 0 comments
Labels
Milestone

Comments

@ctron
Copy link
Contributor

ctron commented Jul 9, 2020

Describe the bug

If the namespace a MessagingEndpoint is located in, starts with a number, the creation of the service will fail, as a service name must be a valid DNS name, and must not start with a number.

To Reproduce
Steps to reproduce the behavior:

  1. Create MessagingInfrastructure
  2. Create a new namespace 123
  3. Create a MessagingProject
  4. Create a MessagingEndpoint
  5. Service does not get created

Expected behavior

I should be possible to create endpoints in a valid Kubernetes namespace.

Screenshots

Status section of MessagingEndpoint
{
  "conditions": [
    {
      "lastTransitionTime": "2020-07-08T16:04:52Z",
      "status": "True",
      "type": "FoundProject"
    },
    {
      "lastTransitionTime": "2020-07-08T16:04:52Z",
      "status": "Unknown",
      "type": "ConfiguredTLS"
    },
    {
      "lastTransitionTime": "2020-07-08T16:04:52Z",
      "status": "True",
      "type": "AllocatedPorts"
    },
    {
      "lastTransitionTime": "2020-07-08T16:04:52Z",
      "status": "Unknown",
      "type": "Created"
    },
    {
      "lastTransitionTime": "2020-07-08T16:04:52Z",
      "message": "Service \"8e0a8244-68b3-41bc-b9ff-919d14ef8431-downstream\" is invalid: metadata.name: Invalid value: \"8e0a8244-68b3-41bc-b9ff-919d14ef8431-downstream\": 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])?')",
      "status": "False",
      "type": "ServiceCreated"
    },
    {
      "lastTransitionTime": "2020-07-08T16:04:52Z",
      "status": "Unknown",
      "type": "Ready"
    }
  ],
  "internalPorts": [
    {
      "name": "8e0a8244-68b3-41bc-b9ff-919d14ef8431-downstream-AMQP",
      "port": 40018,
      "protocol": "AMQP"
    }
  ],
  "message": "Service \"8e0a8244-68b3-41bc-b9ff-919d14ef8431-downstream\" is invalid: metadata.name: Invalid value: \"8e0a8244-68b3-41bc-b9ff-919d14ef8431-downstream\": 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])?')",
  "phase": "Configuring",
  "type": "NodePort"
}

Additional context
Add any other context about the problem here.

@ctron ctron added the kind/bug label Jul 9, 2020
@lulf lulf added this to the 1.0.0 milestone Jul 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants