Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use <portNumber>-<protocol> as pod container port name in devfile library generator #287

Closed
yangcao77 opened this issue Jan 5, 2021 · 4 comments
Assignees
Labels
area/api Enhancement or issue related to the api/devfile specification kind/enhancement New feature or request

Comments

@yangcao77
Copy link
Contributor

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,
			}
@yangcao77 yangcao77 added the area/api Enhancement or issue related to the api/devfile specification label Jan 5, 2021
@yangcao77 yangcao77 self-assigned this Jan 5, 2021
@yangcao77 yangcao77 added the kind/enhancement New feature or request label Jan 5, 2021
@elsony
Copy link
Contributor

elsony commented Jan 7, 2021

Blocked by #288

@amisevsk

This comment has been minimized.

@mik-dass
Copy link

mik-dass commented Feb 3, 2021

Can we close this issue?

@yangcao77
Copy link
Contributor Author

Yes. Forgot to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Enhancement or issue related to the api/devfile specification kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants