Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion cli_reference/developer_cli_odo/configuring-the-odo-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ include::_attributes/common-attributes.adoc[]

toc::[]

include::modules/developer-cli-odo-using-command-completion.adoc[leveloffset=+1]
// Comment out per https://issues.redhat.com/browse/RHDEVDOCS-3594
// include::modules/developer-cli-odo-using-command-completion.adoc[leveloffset=+1]

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.

// view config
include::modules/developer-cli-odo-view-config.adoc[leveloffset=+1]
// set key
include::modules/developer-cli-odo-set-config.adoc[leveloffset=+1]
// unset key
include::modules/developer-cli-odo-unset-config.adoc[leveloffset=+1]
// preference ref table
include::modules/developer-cli-odo-preference-table.adoc[leveloffset=+1]

include::modules/developer-cli-odo-ignoring-files-or-patterns.adoc[leveloffset=+1]
43 changes: 43 additions & 0 deletions modules/developer-cli-odo-preference-table.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Module included in the following assemblies:
//
// * cli_reference/developer_cli_odo/configuring-the-odo-cli.adoc

:_content-type: REFERENCE
[id="developer-cli-odo-preference-table_{context}"]
= Preference key table

The following table shows the available options for setting preference keys for the `odo` CLI:

[cols="1,3,1"]
|===
|Preference key |Description |Default value

|`UpdateNotification`
|Control whether a notification to update `odo` is shown.
|True

|`NamePrefix`
|Set a default name prefix for an `odo` resource. For example, `component` or `storage`.
|Current directory name

|`Timeout`
|Timeout for the Kubernetes server connection check.
|1 second

|`BuildTimeout`
|Timeout for waiting for a build of the git component to complete.
|300 seconds

|`PushTimeout`
|Timeout for waiting for a component to start.
|240 seconds

|`Ephemeral`
|Controls whether `odo` should create an `emptyDir` volume to store source code.
|True

|`ConsentTelemetry`
|Controls whether `odo` can collect telemetry for the user's `odo` usage.
|False

|===
31 changes: 31 additions & 0 deletions modules/developer-cli-odo-set-config.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Module included in the following assemblies:
//
// * cli_reference/developer_cli_odo/configuring-the-odo-cli.adoc

:_content-type: REFERENCE
[id="developer-cli-odo-set-config_{context}"]
= Setting a value

You can set a value for a preference key by using the following command:

[source,terminal]
----
$ odo preference set <key> <value>
----

[NOTE]
====
Preference keys are case-insensitive.
====

.Example command
[source,terminal]
----
$ odo preference set updatenotification false
----

.Example output
[source,terminal]
----
Global preference was successfully updated
----
32 changes: 32 additions & 0 deletions modules/developer-cli-odo-unset-config.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Module included in the following assemblies:
//
// * cli_reference/developer_cli_odo/configuring-the-odo-cli.adoc

:_content-type: REFERENCE
[id="developer-cli-odo-unset-config_{context}"]
= Setting a value

You can unset a value for a preference key by using the following command:

[source,terminal]
----
$ odo preference unset <key>
----

[NOTE]
====
You can use the `-f` flag to skip the confirmation.
====

.Example command
[source,terminal]
----
$ odo preference unset updatenotification
? Do you want to unset updatenotification in the preference (y/N) y
----

.Example output
[source,terminal]
----
Global preference was successfully updated
----
27 changes: 27 additions & 0 deletions modules/developer-cli-odo-view-config.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Module included in the following assemblies:
//
// * cli_reference/developer_cli_odo/configuring-the-odo-cli.adoc

:_content-type: REFERENCE
[id="developer-cli-odo-view-config_{context}"]
= Viewing the current configuration

You can view the current `odo` CLI configuration by using the following command:

[source,terminal]
----
$ odo preference view
----

.Example output
[source,terminal]
----
PARAMETER CURRENT_VALUE
UpdateNotification
NamePrefix
Timeout
BuildTimeout
PushTimeout
Ephemeral
ConsentTelemetry true
----