Skip to main content
Version: 3.0.0 (Beta 2) 🚧

Configuration

Configuring odo global settings

The global settings for odo can be found in preference.yaml file; which is located by default in the .odo directory of the user's HOME directory.

Example:

/home/userName/.odo/preference.yaml

A different location can be set for the preference.yaml by exporting GLOBALODOCONFIG in the user environment.

View the configuration

To view the current configuration, run odo preference view.

odo preference view

Example:

$ odo preference view
PARAMETER CURRENT_VALUE
UpdateNotification
Timeout
PushTimeout
RegistryCacheTime
Ephemeral
ConsentTelemetry

Set a configuration

To set a value for a preference key, run odo preference set <key> <value>.

odo preference set updatenotification false

Example:

$ odo preference set updatenotification false
Global preference was successfully updated

Note that the preference key is case-insensitive.

Unset a configuration

To unset a value of a preference key, run odo preference unset <key>; use -f flag to skip the confirmation.

odo preference unset updatednotification

Example:

$ odo preference unset updatednotification
? Do you want to unset updatenotification in the preference (y/N) y
Global preference was successfully updated

Unsetting a preference key sets it to an empty value in the preference file. odo will use the default value for such configuration.

Preference Key Table

PreferenceDescriptionDefault
UpdateNotificationControl whether a notification to update odo is shownTrue
TimeoutTimeout for Kubernetes server connection check1 second
PushTimeoutTimeout for waiting for a component to start240 seconds
RegistryCacheTimeFor how long (in minutes) odo will cache information from the Devfile registry4 Minutes
EphemeralControl whether odo should create a emptyDir volume to store source codeTrue
ConsentTelemetryControl whether odo can collect telemetry for the user's odo usageFalse

Managing Devfile registries

odo uses the portable devfile format to describe the components. odo can connect to various devfile registries to download devfiles for different languages and frameworks.

You can connect to publicly available devfile registries, or you can install your own Devfile Registry.

You can use the odo preference <add/remove> registry command to manage the registries used by odo to retrieve devfile information.

Adding a registry

You can use the following command to add a registry:

odo preference add registry

For example:

$ odo preference add registry StageRegistry https://registry.stage.devfile.io
New registry successfully added

Deleting a registry

You can delete a registry with the command:

odo preference remove registry

For example:

$ odo preference remove registry StageRegistry
? Are you sure you want to delete registry "StageRegistry" Yes
Successfully deleted registry

You can use the --force (or -f) flag to force the deletion of the registry without confirmation.

note

To update a registry, you can delete it and add it again.

Advanced configuration

This is a configuration that normal odo users don't need to touch. Options here are mostly used for debugging and testing odo behavior.

Environment variables controlling odo behavior

VariableUsage
PODMAN_CMDThe command executed to run the local podman binary. podman by default
DOCKER_CMDThe command executed to run the local docker binary. docker by default
ODO_BOOTSTRAPPER_IMAGE
ODO_LOG_LEVEL
ODO_DISABLE_TELEMETRY
GLOBALODOCONFIG
ODO_DEBUG_TELEMETRY_FILEUseful for debugging telemetry. When set it will save telemetry data to a file instead of sending it to the server.
DEVFILE_PROXYIntegration tests will use this address as Devfile registry instead of https://registry.stage.devfile.io