Closed
Description
The generator currently is using the devfile Endpoint name as the pod container port name. However, the pod container port name has a 15 characters limit, and as a result, Endpoint name is limited to be less than 15 characters.
Since Odo now wants to remove that 15 characters truncating for URL Name:redhat-developer/odo#4060, I rechecked the 15 chars limitation only applies to pod container port name.
We can apply how Odo deals with the port name for S2I projects, use <portNumber>-<protocol>
as the name :https://github.com/openshift/odo/blob/cdfa5450201702406feefe3e4de3cc3f5ee494be/pkg/util/util.go#L575-L578
port := corev1.ContainerPort{
Name: fmt.Sprintf("%d-%s", portNumber, strings.ToLower(string(portProto))),
ContainerPort: portNumber,
Protocol: portProto,
}