/kind bug
Operating System: all
Output of odo version: master
Tried odo url create for a component based on DevFile.
$ odo url create
✗ host must be provided in order to create ingress
$ odo url create -h
Create a URL for a component. The created URL can be used to access the specified component from outside the OpenShift cluster.
Usage:
odo url create [url name] [flags]
Examples:
# Create a URL with a specific name by automatically detecting the port used by the component
odo url create example
# Create a URL for the current component with a specific port
odo url create --port 8080
# Create a URL with a specific name and port
odo url create example --port 8080
Flags:
--context string Use given context directory as a source for component settings
--devfile string Path to a devfile.yaml (default "./devfile.yaml")
-h, --help Help for create
--host string Cluster ip for this URL
--now Push changes to the cluster immediately
--port int Port number for the url of the component, required in case of components which expose more than one service port (default -1)
--secure Creates a secure https url
--tls-secret string Tls secret name for the url of the component if the user bring his own tls secret
Additional Flags:
-v, --v Level Log level for V logs. Level varies from 0 to 9 (default 0).
--vmodule moduleSpec Comma-separated list of pattern=N settings for file-filtered logging
Command failed asking me to provide a value for host. But there's no example for how this can be done in odo url create -h or in the docs.
There should at least be CLI docs (i..e. and example in output of odo url create -h) for this.
I understand that adding it to documentation might take some time since this is experimental and subject to change.
Setting high priority on this one because creation of URL is pretty important to access the component deployed on the cluster.
/label priority/high
@dharmit: The label(s) /label priority/high cannot be applied. These labels are supported: platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash
In response to this:
Setting high priority on this one because creation of URL is pretty important to access the component deployed on the cluster.
/label priority/high
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.
ping @kadel @elsony
Command failed asking me to provide a value for
host. But there's no example for how this can be done inodo url create -hor in the docs.
this is a side-effect of the fact that odo url create creates only Ingress. Ingress requires host to be specified not like Route that can determine host automatically on the cluster based on router controller configuration.
Route support should be added back as part of https://github.com/openshift/odo/issues/2727
I think that this is more a documentation issue than bug.
I am running a CRC VM on my laptop and I've tried to do:
$ odo url create --host console-openshift-console.apps-crc.testing --secure
It creates a URL without any error, I push it as well. But the application is not accessible on the URL thus created. Maybe it's the ingres vs. route thing as you mentioned @kadel.
I think that this is more a documentation issue than bug.
I didn't add it as documentation because that might have got the docs team looking into this which is not what we need right now. :smile:
@dharmit you should use just --host apps-crc.testing
The flag actually doesn't specify full host for Ingress, but rather base domain, the actually host will be <url name>.<--host value>
so if you do odo url create --port 8080 --host apps-crc.testing the name of the url is autogenerated from the component name and port. The actual url will be http://mycomponent-8080.apps-crc.testing
if you do odo url create myurl --port 8080 --host apps-crc.testing the url will be http://myurl.apps-crc.testing
@dharmit I actually almost started to update the CLI reference doc. :D Tag/ping me if this will need an update in the docs on the website.
Most helpful comment
The flag actually doesn't specify full host for Ingress, but rather base domain, the actually host will be
<url name>.<--host value>so if you do
odo url create --port 8080 --host apps-crc.testingthe name of the url is autogenerated from the component name and port. The actual url will behttp://mycomponent-8080.apps-crc.testingif you do
odo url create myurl --port 8080 --host apps-crc.testingthe url will behttp://myurl.apps-crc.testing