Configuring the odo CLI
You can find the global settings for odo
in the preference.yaml
file which is located by default in your $HOME/.odo
directory.
You can set a different location for the preference.yaml
file by exporting the GLOBALODOCONFIG
variable.
Viewing the current configuration
You can view the current odo
CLI configuration by using the following command:
$ odo preference view
Example output
PARAMETER CURRENT_VALUE
UpdateNotification
NamePrefix
Timeout
BuildTimeout
PushTimeout
Ephemeral
ConsentTelemetry true
Setting a value
You can set a value for a preference key by using the following command:
$ odo preference set <key> <value>
Preference keys are case-insensitive. |
Example command
$ odo preference set updatenotification false
Example output
Global preference was successfully updated
Unsetting a value
You can unset a value for a preference key by using the following command:
$ odo preference unset <key>
You can use the |
Example command
$ odo preference unset updatenotification
? Do you want to unset updatenotification in the preference (y/N) y
Example output
Global preference was successfully updated
Preference key table
The following table shows the available options for setting preference keys for the odo
CLI:
Preference key | Description | Default value |
---|---|---|
| Control whether a notification to update | True |
| Set a default name prefix for an | Current directory name |
| Timeout for the Kubernetes server connection check. | 1 second |
| Timeout for waiting for a build of the git component to complete. | 300 seconds |
| Timeout for waiting for a component to start. | 240 seconds |
| Controls whether | True |
| Controls whether | False |
Ignoring files or patterns
You can configure a list of files or patterns to ignore by modifying the .odoignore
file in the root directory of your application. This applies to both odo push
and odo watch
.
If the .odoignore
file does not exist, the .gitignore
file is used instead for ignoring specific files and folders.
To ignore .git
files, any files with the .js
extension, and the folder tests
, add the following to either the .odoignore
or the .gitignore
file:
.git
*.js
tests/
The .odoignore
file allows any glob expressions.