Skip to content

Commit f2c1d74

Browse files
committed
OSDOCS#16913: CQA for next set of CLI assemblies
1 parent f3b048c commit f2c1d74

9 files changed

Lines changed: 43 additions & 39 deletions

cli_reference/openshift_cli/administrator-cli-commands.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
This reference provides descriptions and example commands for OpenShift CLI (`oc`) administrator commands. You must have `cluster-admin` or equivalent permissions to use these commands.
9+
[role="_abstract"]
10+
To learn more about the {oc-first} administrator commands, review their descriptions and example commands. You must have `cluster-admin` or equivalent permissions to use these commands.
1011

1112
For developer commands, see the xref:../../cli_reference/openshift_cli/developer-cli-commands.adoc#cli-developer-commands[OpenShift CLI developer command reference].
1213

cli_reference/openshift_cli/configuring-cli.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9+
[role="_abstract"]
10+
TODO
11+
12+
// TODO move this below to module? so small though. Maybe just consider removing the umbrella heading
913
[id="cli-enabling-tab-completion"]
1014
== Enabling tab completion
1115

cli_reference/openshift_cli/developer-cli-commands.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
This reference provides descriptions and example commands for OpenShift CLI (`oc`) developer commands.
9+
[role="_abstract"]
10+
To learn more about the {oc-first} developer commands, review their descriptions and example commands.
11+
1012
ifdef::openshift-enterprise,openshift-origin[]
1113
For administrator commands, see the xref:../../cli_reference/openshift_cli/administrator-cli-commands.adoc#cli-administrator-commands[OpenShift CLI administrator command reference].
1214
endif::openshift-enterprise,openshift-origin[]

cli_reference/openshift_cli/extending-cli-plugins.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
You can write and install plugins to build on the default `oc` commands,
10-
allowing you to perform new and more complex tasks with the
9+
[role="_abstract"]
10+
You can write and install plugins to build on the default `oc` commands, allowing you to perform new and more complex tasks with the
1111
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
1212
{product-title}
1313
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

modules/cli-configuring-kubeconfig-using-cli.adoc

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66
[id="cli-accessing-kubeconfig-using-cli_{context}"]
77
= Accessing kubeconfig by using the oc CLI
88

9+
[role="_abstract"]
910
You can use the `oc` CLI to log in to your OpenShift cluster and retrieve a kubeconfig file for accessing the cluster from the command line.
1011

12+
[IMPORTANT]
13+
====
14+
If you plan to reuse the exported `kubeconfig` file across sessions or machines, store it securely and avoid committing it to source control.
15+
====
16+
1117
.Prerequisites
1218

1319
* You have access to the {product-title} web console or API server endpoint.
@@ -18,12 +24,14 @@ You can use the `oc` CLI to log in to your OpenShift cluster and retrieve a kube
1824
+
1925
[source,terminal]
2026
----
21-
$ oc login <api-server-url> -u <username> -p <password> <1><2><3>
27+
$ oc login <api_server_url> -u <username> -p <password>
2228
----
2329
+
24-
<1> Specify the full API server URL. For example: `https://api.my-cluster.example.com:6443`.
25-
<2> Specify a valid username. For example: `kubeadmin`.
26-
<3> Provide the password for the specified user. For example, the `kubeadmin` password generated during cluster installation.
30+
where:
31+
32+
`<api_server_url>`:: Specifies the full API server URL; for example, `https://api.my-cluster.example.com:6443`.
33+
`<username>`:: Specifies a valid username; for example, `kubeadmin`.
34+
`<password>`:: Specifies the password for the specified user; for example, the `kubeadmin` password generated during cluster installation.
2735

2836
. Save the cluster configuration to a local file by running the following command:
2937
+
@@ -45,8 +53,3 @@ $ export KUBECONFIG=./kubeconfig
4553
----
4654
$ oc get nodes
4755
----
48-
49-
[NOTE]
50-
====
51-
If you plan to reuse the exported `kubeconfig` file across sessions or machines, store it securely and avoid committing it to source control.
52-
====

modules/cli-extending-plugins-installing.adoc

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
[id="cli-installing-plugins_{context}"]
77
= Installing and using CLI plugins
88

9+
[role="_abstract"]
910
After you write a custom plugin for the
1011
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
1112
{product-title}
1213
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
1314
ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
1415
OpenShift
1516
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
16-
CLI, you must install
17-
the plugin before use.
17+
CLI, you must install the plugin before use.
1818

1919
.Prerequisites
2020

@@ -50,19 +50,15 @@ The following compatible plugins are available:
5050
/usr/local/bin/<plugin_file>
5151
----
5252
+
53-
If your plugin is not listed here, verify that the file begins with `oc-`
54-
or `kubectl-`, is executable, and is on your `PATH`.
53+
If your plugin is not listed here, verify that the file begins with `oc-` or `kubectl-`, is executable, and is on your `PATH`.
5554
. Invoke the new command or option introduced by the plugin.
5655
+
57-
For example, if you built and installed the `kubectl-ns` plugin from the
58-
link:https://github.com/kubernetes/sample-cli-plugin[Sample plugin repository],
59-
you can use the following command to view the current namespace.
56+
For example, if you built and installed the `kubectl-ns` plugin from the link:https://github.com/kubernetes/sample-cli-plugin[Sample plugin repository], you can use the following command to view the current namespace.
6057
+
6158
[source,terminal]
6259
----
6360
$ oc ns
6461
----
6562
+
6663
Note that the command to invoke the plugin depends on the plugin file name.
67-
For example, a plugin with the file name of `oc-foo-bar` is invoked by the `oc foo bar`
68-
command.
64+
For example, a plugin with the file name of `oc-foo-bar` is invoked by the `oc foo bar` command.

modules/cli-extending-plugins-writing.adoc

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,27 @@
66
[id="cli-writing-plugins_{context}"]
77
= Writing CLI plugins
88

9+
[role="_abstract"]
910
You can write a plugin for the
1011
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
1112
{product-title}
1213
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
1314
ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
1415
OpenShift
1516
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
16-
CLI in any programming language
17-
or script that allows you to write command-line commands. Note that you can not
18-
use a plugin to overwrite an existing `oc` command.
17+
CLI in any programming language or script that allows you to write command-line commands. Note that you cannot use a plugin to overwrite an existing `oc` command.
1918

20-
.Procedure
19+
This procedure creates a simple Bash plugin that prints a message to the terminal when the `oc foo` command is issued.
2120

22-
This procedure creates a simple Bash plugin that prints a message to the
23-
terminal when the `oc foo` command is issued.
21+
.Procedure
2422

2523
. Create a file called `oc-foo`.
2624
+
2725
When naming your plugin file, keep the following in mind:
2826

2927
* The file must begin with `oc-` or `kubectl-` to be recognized as a
3028
plugin.
31-
* The file name determines the command that invokes the plugin. For example, a
32-
plugin with the file name `oc-foo-bar` can be invoked by a command of
33-
`oc foo bar`. You can also use underscores if you want the command to contain
34-
dashes. For example, a plugin with the file name `oc-foo_bar` can be invoked
35-
by a command of `oc foo-bar`.
29+
* The file name determines the command that invokes the plugin. For example, a plugin with the file name `oc-foo-bar` can be invoked by a command of `oc foo bar`. You can also use underscores if you want the command to contain dashes. For example, a plugin with the file name `oc-foo_bar` can be invoked by a command of `oc foo-bar`.
3630
3731
. Add the following contents to the file.
3832
+
@@ -56,20 +50,18 @@ fi
5650

5751
echo "I am a plugin named kubectl-foo"
5852
----
59-
53+
+
6054
After you install this plugin for the
6155
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
6256
{product-title}
6357
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
6458
ifdef::openshift-rosa,openshift-rosa-hcp[]
6559
OpenShift
6660
endif::openshift-rosa,openshift-rosa-hcp[]
67-
CLI, it can be invoked
68-
using the `oc foo` command.
61+
CLI, it can be invoked using the `oc foo` command.
6962

7063
[role="_additional-resources"]
7164
.Additional resources
7265

73-
* Review the link:https://github.com/kubernetes/sample-cli-plugin[Sample plugin repository]
74-
for an example of a plugin written in Go.
75-
* Review the link:https://github.com/kubernetes/cli-runtime/[CLI runtime repository] for a set of utilities to assist in writing plugins in Go.
66+
* link:https://github.com/kubernetes/sample-cli-plugin[Sample plugin repository]
67+
* link:https://github.com/kubernetes/cli-runtime/[CLI runtime repository]

modules/oc-adm-by-example-content.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
[id="openshift-cli-admin_{context}"]
77
= OpenShift CLI (oc) administrator commands
88

9+
[role="_abstract"]
10+
Review the commands that cluster administrators can use to configure, maintain, and troubleshoot OpenShift Container Platform clusters.
11+
912

1013

1114
== oc adm build-chain

modules/oc-by-example-content.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
[id="openshift-cli-developer_{context}"]
77
= OpenShift CLI (oc) developer commands
88

9+
[role="_abstract"]
10+
Review the commands that developers can use to create, deploy, and manage applications on OpenShift Container Platform clusters.
11+
912

1013

1114
== oc annotate

0 commit comments

Comments
 (0)