-
Notifications
You must be signed in to change notification settings - Fork 242
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
port names should match endpoint names #4737
Comments
The service port naming is done here https://github.com/devfile/library/blob/5d88bd3c1220097161ef07d78c9fe7605be24ab7/pkg/devfile/generator/utils.go#L229. |
We should coordinate with the Devfiles team to change this. |
Currently we allow multiple URLs on the same port, but k8s doesn't allow services to have two ports with the same port number and protocol combination. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/lifecycle rotten
/remove-lifecycle stale
…On Tue, 12 Oct 2021 at 17:06, OpenShift Bot ***@***.***> wrote:
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle rotten
/remove-lifecycle stale
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4737 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAN65SCDEKDQSE6FHU4MULUGRFFVANCNFSM45HMQDXA>
.
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen. |
This problem was again raised by user on slack
|
These changes were made to accommodate another issue that odo was facing, see #4060, devfile/api#287, and devfile/library#51. |
This is also another issue that tools will face, and why the change was initially made in library. As devfile allows multiple endpoints within same component to use same port. but you can only expose a port number once in a K8s service. In other word, if it behavior as described in the main issue description, the K8s service spec generated will be invalid :
The k8s Service that gets generated is valid:
|
This is not the same issue with devfile/api#287, and devfile/library#51. those were pod container port name |
To summarize the current issue:
K8s:
Now, a Odo user reports the service port name does not match the actual endpoint name. And we are looking for a more appropriate solution for the container port name & service port name. |
Can we make this invalid? I'm not sure if there is a case where it would be required to have endpoints exposing the same port on one container component |
Need to check to make sure it doesn't causes problems on update/migration |
|
Once devfile/api#702 is merged, we should add validation check to Example➜ odo url create --port 3030 --ingress --host `minikube ip`
✓ URL nodejs-abc-cusv-3050 created for component: nodejs-abc-cusv
To apply the URL configuration changes, please use `odo push`
➜ odo url create --port 3030 3030-myport --ingress --host `minikube ip`
✓ URL 3030-myport created for component: nodejs-abc-cusv
To apply the URL configuration changes, please use `odo push`
➜ odo push
✗ 1 error occurred:
* devfile contains multiple endpoint entries with same TargetPort: 3030
➜ odo url delete 3030-myport
✗ failed to parse the devfile devfile.yaml, with error: 1 error occurred:
* devfile contains multiple endpoint entries with same TargetPort: 3030 Scope of the issue:
|
Assuming that devfile containers have following endpoints
The k8s Service that gets generated for odo should have matching port names
Current situation:
/priority high
/kind bug
The text was updated successfully, but these errors were encountered: