diff --git a/cli_reference/developer_cli_odo/configuring-the-odo-cli.adoc b/cli_reference/developer_cli_odo/configuring-the-odo-cli.adoc index 2e8c38601891..88a220a47cca 100644 --- a/cli_reference/developer_cli_odo/configuring-the-odo-cli.adoc +++ b/cli_reference/developer_cli_odo/configuring-the-odo-cli.adoc @@ -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] diff --git a/modules/developer-cli-odo-preference-table.adoc b/modules/developer-cli-odo-preference-table.adoc new file mode 100644 index 000000000000..5fd8e5d2a27f --- /dev/null +++ b/modules/developer-cli-odo-preference-table.adoc @@ -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 + +|=== diff --git a/modules/developer-cli-odo-set-config.adoc b/modules/developer-cli-odo-set-config.adoc new file mode 100644 index 000000000000..b946c88b6d88 --- /dev/null +++ b/modules/developer-cli-odo-set-config.adoc @@ -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 +---- + +[NOTE] +==== +Preference keys are case-insensitive. +==== + +.Example command +[source,terminal] +---- +$ odo preference set updatenotification false +---- + +.Example output +[source,terminal] +---- +Global preference was successfully updated +---- diff --git a/modules/developer-cli-odo-unset-config.adoc b/modules/developer-cli-odo-unset-config.adoc new file mode 100644 index 000000000000..3e6255faa3c4 --- /dev/null +++ b/modules/developer-cli-odo-unset-config.adoc @@ -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 +---- + +[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 +---- diff --git a/modules/developer-cli-odo-view-config.adoc b/modules/developer-cli-odo-view-config.adoc new file mode 100644 index 000000000000..d8cd5ef914ec --- /dev/null +++ b/modules/developer-cli-odo-view-config.adoc @@ -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 +----