-
Notifications
You must be signed in to change notification settings - Fork 244
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
Feature: Set port config while creating initial devfile #4448
Comments
@girishramnani this is exactly what you were talking about yesterday. |
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 |
/remove-lifecycle rotten @kadel can you PTAL? |
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 |
Any updates on this? It's needed to support our default nodejs example app |
I've tried using Both options ( Our example app runs on Let me know if you have any tips on how to set it up using odo and a local copy of the git repo:
Or alternatively...
I'm able to successfully edit the resulting |
With odo v3, there's yet no direct way of passing a flag to In the directory where your code resides, run Next, it will let you modify env vars for the "runtime" container. By default, port for this is 3000. You should delete the port and add 8080. All of this through interactive mode. |
odo create nodejs component --port 8080
odo init nodejs --port 8080
odo init nodejs --port 8080
odo init nodejs frontend --port 8080
Thanks @dharmit, @serenamarie125 This works for me in interactive mode with v3.0.0beta2 Looking forward to a non-interactive way to generate a devfile as well - which might also resolve #4435 |
more info how to approach this is in #6211 (comment) |
odo init nodejs frontend --port 8080
odo init nodejs frontend --port 8080
odo init nodejs frontend --port 8080
odo init --port 8080
odo init --port 8080
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity. |
This issue was closed because it has been inactive for 30 days since being marked as stale. |
/kind feature
Which functionality do you think we should add?
It would be really nice to have a
--port
option forodo create
that would allow users to modify and/or extend the catalog devfile examples. This currently works for--s2i
, but is not yet available for devfiles.Why is this needed?
The default nodejs devfile example (from the registry catalog) binds to 3000 by default. This works well for the --starter repo, but binding to port 3000 is not used exclusively by all nodejs projects. Users can run
odo config set Ports 8080
as a workaround, but this seems to append additional port info instead of replacing the older config.Here is a clip from my resulting devfile.yaml using odo v2.0.5 (e8030b1):
Currently, users who take this approach will end up with two routes after running
odo push
. Clicking on the "Open URL" decorator in the Topology view fails - unless the user cleans up the invalid port config usingoc delete route http-3000-frontend
Ideally, users should be able to set the port config during the initial devfile creation step, via
odo create nodejs component_name --port 8080
See the "frontend" component here for an example nodejs app that binds to 8080: https://learn.openshift.com/introduction/developing-with-odo/
The text was updated successfully, but these errors were encountered: