Skip to main content
Version: v3

Using Devfile Registries declared in the cluster

Besides getting the list of Devfile Registries to work with from the local configuration file, odo can automatically detect Devfile Registries declared in the current cluster, and use them.

It does so by detecting the presence of the following Custom Resources in the current cluster:

  • ClusterDevfileRegistriesList: installable at the cluster level
  • DevfileRegistriesList: installable at the namespace level

More details on the Devfile Registry Operator documentation.

info

Registries declared in ClusterDevfileRegistriesList and DevfileRegistriesList Custom Resources do not necessarily need to be deployed and running in the cluster. Only their URLs are listed in those resources.

Registries listed in the Custom Resources above are added automatically to the top of the list of registries usable by odo, and odo will use them in the following priority order:

  1. registries from the current namespace (declared in the DevfileRegistriesList resource)
  2. cluster-wide registries (declared in the ClusterDevfileRegistriesList resource)
  3. all other registries configured in the local configuration file

This behavior applies to all odo commands interacting with Devfile registries, such as:

You can use the odo preference view command at any time to see the registries sorted by priority.

Example output:
$ odo preference view
[...]

Devfile registries:
NAME URL SECURE
ns-devfile-registry http://my-devfile-registry.my-ns.172.17.0.1.nip.io No
ns-devfile-staging https://registry.stage.devfile.io Yes
cluster-devfile-registry http://my-devfile-registry.cluster.172.17.0.1.nip.io No
cluster-devfile-staging https://registry.stage.devfile.io Yes
cluster-devfile-prod https://registry.devfile.io Yes
Staging https://registry.stage.devfile.io Yes
DefaultDevfileRegistry https://registry.devfile.io Yes

Please refer to this blog post for more details on how to deploy a Devfile Registry into a cluster and use it with odo.