Skip to content

Odd issue when using a name for a url creation when there is already a route in the devfile.yaml #5387

@cdrage

Description

@cdrage

/kind bug

What versions of software are you using?

Operating System: Linux

Output of odo version: odo v2.5.0 (724f16e)

How did you run odo exactly?

git clone https://github.com/odo-devfiles/odo-quickstart
cd odo-quickstart/frontend
odo create nodejs frontend
odo url create nodejs --port 3000 --host foo.com
odo push

Actual behavior

/odo-quickstart/frontend  main ✗                                                                                                                                                                                                                                                                                                                                   119d ◒  
▶ odo push

Validation
 ✓  Validating the devfile [59588ns]

Creating Services for component frontend
 ✓  Services are in sync with the cluster, no changes are required

Creating Kubernetes resources for component frontend
 ✓  Waiting for component to start [8s]
 ✓  Links are in sync with the cluster, no changes are required
 ✓  Waiting for component to start [7ms]
 ⚠  Unable to create ingress, missing host information for Endpoint http-3000, please check instructions on URL creation (refer `odo url create --help`)

Why does it show a warning for the ingress of http-3000?

If I am creating a URL with the same port, why is it added to the devfile.yaml rather than overriding the current one in there?

See the devfile.yaml output:

components:
- container:
    dedicatedPod: false
    endpoints:
    - name: http-3000
      secure: false
      targetPort: 3000
    - exposure: public
      name: nodejs
      path: /
      protocol: http
      secure: false
      targetPort: 3000
    image: registry.access.redhat.com/ubi8/nodejs-14:latest
    memoryLimit: 1024Mi
    mountSources: true
    sourceMapping: /project
  name: runtime

Expected behavior

Expected behaviour is to for the one within the devfile.yaml to be overridden, or atleast a warning come up when you use odo url create... it's very odd that it will just append to the devfile.yaml and not check what's already in there.

Any logs, error output, etc?

See above

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.priority/HighImportant issue; should be worked on before any other issues (except priority/Critical issue(s)).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions