-
Bug
-
Resolution: Done
-
Major
-
3.8.0.GA
-
Team A: Dashboard, devfile and plugin registries, open-vsx, devfile-converter, configbump + traefik, image-puller, server, gateway, authentication, try-in-web-ide action, telemetry, Team B: Dev Spaces operator + chectl/dsc, DevWorkspace + Operator, Web Terminal + Operator, Universal Developer Image, machine-exec, dev environment config
-
None
-
False
-
-
False
-
Fixed in DevSpaces 3.10
-
-
When defining a kubernetes component in a devfile you can define an endpoint with a target port.
If this port is already used by a container component (for inner loop) then it conflicts and the workspace is not created.
Innerloop development and Outerloop development are two different phases in the lifecycle of a component/application and it would make sense if they were running on the same target port. They would also not be running on the same pod, so it would make sense they should be able to run on the same target port.
The workaround is to change the targetPort to 8081 instead of 8080 and change the image built to listen to that new port....
This has been fixed for odo and the devfile API:
https://github.com/devfile/api/issues/1049
While I understand that odo and devspaces are different beast I don't understand how different services (outerloop / innerloop) can't have the save port.
For example in WildFly devfile I use the unversal-developer-image to build an run my application on port 8080 so I have defined that endpoint on the container:
name: tools
container:
image: quay.io/devfile/universal-developer-image:ubi8-latest
....
endpoints:
- name: debug
exposure: internal
protocol: tcp
targetPort: 5005
- name: 'http'
protocol: http
targetPort: 8080
exposure: public
....
but since I also plan on being able to deploy the resulting application image on the cloud I have :
- name: kubernetes-deploy
kubernetes:
endpoints:
- name: http-8080
path: /
targetPort: 8080
uri: deploy.yaml
the workaround is to define
- name: kubernetes-deploy
kubernetes:
endpoints:
- name: http-8081
path: /
targetPort: 8081
uri: deploy.yaml
which means also to change the deploy.yaml to use the port 8081 and the listening port for Wildfly in the resulting image.