From dc73280a0c4a0f1fab28c3b1e757f5e422df6ff6 Mon Sep 17 00:00:00 2001 From: Agil Antony Date: Mon, 18 May 2026 13:56:25 +0530 Subject: [PATCH] ROX33164 Fixing DITA errors in cli/command-reference/roxctl-netpol.adoc --- cli/command-reference/roxctl-netpol.adoc | 38 +++++++------ modules/roxctl-netpol-available-commands.adoc | 21 ++++++++ ...xctl-netpol-connectivity-diff-options.adoc | 39 ++++++++++++++ ...roxctl-netpol-connectivity-diff-usage.adoc | 16 ++++++ modules/roxctl-netpol-connectivity-diff.adoc | 42 ++------------- ...oxctl-netpol-connectivity-map-options.adoc | 47 ++++++++++++++++ .../roxctl-netpol-connectivity-map-usage.adoc | 21 ++++++++ modules/roxctl-netpol-connectivity-map.adoc | 54 ++----------------- modules/roxctl-netpol-connectivity-usage.adoc | 16 ++++++ modules/roxctl-netpol-connectivity.adoc | 13 ++--- modules/roxctl-netpol-generate-options.adoc | 38 +++++++++++++ modules/roxctl-netpol-generate-usage.adoc | 21 ++++++++ modules/roxctl-netpol-generate.adoc | 43 +-------------- modules/roxctl-netpol-overview.adoc | 10 ++++ modules/roxctl-netpol-usage.adoc | 16 ++++++ 15 files changed, 278 insertions(+), 157 deletions(-) create mode 100644 modules/roxctl-netpol-available-commands.adoc create mode 100644 modules/roxctl-netpol-connectivity-diff-options.adoc create mode 100644 modules/roxctl-netpol-connectivity-diff-usage.adoc create mode 100644 modules/roxctl-netpol-connectivity-map-options.adoc create mode 100644 modules/roxctl-netpol-connectivity-map-usage.adoc create mode 100644 modules/roxctl-netpol-connectivity-usage.adoc create mode 100644 modules/roxctl-netpol-generate-options.adoc create mode 100644 modules/roxctl-netpol-generate-usage.adoc create mode 100644 modules/roxctl-netpol-overview.adoc create mode 100644 modules/roxctl-netpol-usage.adoc diff --git a/cli/command-reference/roxctl-netpol.adoc b/cli/command-reference/roxctl-netpol.adoc index 395a1a9f64b5..f411553075a0 100644 --- a/cli/command-reference/roxctl-netpol.adoc +++ b/cli/command-reference/roxctl-netpol.adoc @@ -6,25 +6,15 @@ include::modules/common-attributes.adoc[] toc::[] -Commands related to the network policies. +[role="_abstract"] +Use the `roxctl netpol` command to manage network policies, analyze connectivity, and generate network policy recommendations based on deployment information. -.Usage -[source,terminal] ----- -$ roxctl netpol [command] [flags] ----- +//roxctl netpol overview +include::modules/roxctl-netpol-overview.adoc[leveloffset=+1] -.Available commands -[cols="2,2",options="header"] -|=== -|Command |Description +include::modules/roxctl-netpol-usage.adoc[leveloffset=+2] -|`connectivity` -|Connectivity analysis of the network policy resources. - -|`generate` -|Recommend network policies based on the deployment information. -|=== +include::modules/roxctl-netpol-available-commands.adoc[leveloffset=+2] //Options inherited from the parent command :commandname: roxctl netpol @@ -34,9 +24,23 @@ include::modules/options-inherited-from-the-parent-command.adoc[leveloffset=+1] //roxctl netpol generate include::modules/roxctl-netpol-generate.adoc[leveloffset=+1] +include::modules/roxctl-netpol-generate-usage.adoc[leveloffset=+2] + +include::modules/roxctl-netpol-generate-options.adoc[leveloffset=+2] + //roxctl netpol connectivity include::modules/roxctl-netpol-connectivity.adoc[leveloffset=+1] +include::modules/roxctl-netpol-connectivity-usage.adoc[leveloffset=+2] + include::modules/roxctl-netpol-connectivity-map.adoc[leveloffset=+2] -include::modules/roxctl-netpol-connectivity-diff.adoc[leveloffset=+2] \ No newline at end of file +include::modules/roxctl-netpol-connectivity-map-usage.adoc[leveloffset=+3] + +include::modules/roxctl-netpol-connectivity-map-options.adoc[leveloffset=+3] + +include::modules/roxctl-netpol-connectivity-diff.adoc[leveloffset=+2] + +include::modules/roxctl-netpol-connectivity-diff-usage.adoc[leveloffset=+3] + +include::modules/roxctl-netpol-connectivity-diff-options.adoc[leveloffset=+3] \ No newline at end of file diff --git a/modules/roxctl-netpol-available-commands.adoc b/modules/roxctl-netpol-available-commands.adoc new file mode 100644 index 000000000000..0022dc8923b6 --- /dev/null +++ b/modules/roxctl-netpol-available-commands.adoc @@ -0,0 +1,21 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: REFERENCE +[id="roxctl-netpol-available-commands_{context}"] += Available commands + +[role="_abstract"] +Available commands for the `roxctl netpol` command. + +[cols="2,2",options="header"] +|=== +|Command |Description + +|`connectivity` +|Connectivity analysis of the network policy resources. + +|`generate` +|Recommend network policies based on the deployment information. +|=== diff --git a/modules/roxctl-netpol-connectivity-diff-options.adoc b/modules/roxctl-netpol-connectivity-diff-options.adoc new file mode 100644 index 000000000000..e9ec554a7fdc --- /dev/null +++ b/modules/roxctl-netpol-connectivity-diff-options.adoc @@ -0,0 +1,39 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: REFERENCE +[id="roxctl-netpol-connectivity-diff-options_{context}"] += Options + +[role="_abstract"] +Options for the `roxctl netpol connectivity diff` command. + +[cols="2,2",options="header"] +|=== +|Option |Description + +|`--dir1 string` +|Specify the first directory path of the input resources. This value is mandatory. + +|`--dir2 string` +|Specify the second directory path of the input resources that you want to compare with the first directory path. This value is mandatory. + +|`--fail` +|Fail on the first encounter. The default value is `false`. + +|`-f`, `--output-file string` +|Save the output of the connectivity difference command into a specific file. + +|`-o`, `--output-format string` +|Configure the output of the connectivity difference command in a specific format. Supported formats include `txt`, `md`, `csv`. The default value is `txt`.. + +|`--remove` +|Remove the output path if it already exists. The default value is `false`. + +|`--save-to-file` +|Define whether you want to store the output of the connectivity differences in the default file. The default value is `false`. + +|`--strict` +|Treat warnings as errors. The default value is `false`. +|=== diff --git a/modules/roxctl-netpol-connectivity-diff-usage.adoc b/modules/roxctl-netpol-connectivity-diff-usage.adoc new file mode 100644 index 000000000000..e4aa5990f584 --- /dev/null +++ b/modules/roxctl-netpol-connectivity-diff-usage.adoc @@ -0,0 +1,16 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: REFERENCE +[id="roxctl-netpol-connectivity-diff-usage_{context}"] += roxctl netpol connectivity diff usage + +[role="_abstract"] +Usage syntax for the `roxctl netpol connectivity diff` command. + +.Example +[source,terminal] +---- +$ roxctl netpol connectivity diff [flags] +---- diff --git a/modules/roxctl-netpol-connectivity-diff.adoc b/modules/roxctl-netpol-connectivity-diff.adoc index 23c01bfc1db3..51d77d0d748d 100644 --- a/modules/roxctl-netpol-connectivity-diff.adoc +++ b/modules/roxctl-netpol-connectivity-diff.adoc @@ -1,46 +1,10 @@ // Module included in the following assemblies: // -// * command-reference/roxctl-netpol.adoc +// * cli/command-reference/roxctl-netpol.adoc -:_mod-docs-content-type: REFERENCE +:_mod-docs-content-type: CONCEPT [id="roxctl-netpol-connectivity-diff_{context}"] = roxctl netpol connectivity diff [role="_abstract"] -You can report connectivity differences based on two network policy directories and YAML manifests with workload resources. - -.Example -[source,terminal] ----- -$ roxctl netpol connectivity diff [flags] ----- - -.Options -[cols="2,2",options="header"] -|=== -|Option |Description - -|`--dir1 string` -|Specify the first directory path of the input resources. This value is mandatory. - -|`--dir2 string` -|Specify the second directory path of the input resources that you want to compare with the first directory path. This value is mandatory. - -|`--fail` -|Fail on the first encounter. The default value is `false`. - -|`-f`, `--output-file string` -|Save the output of the connectivity difference command into a specific file. - -|`-o`, `--output-format string` -|Configure the output of the connectivity difference command in a specific format. Supported formats include `txt`, `md`, `csv`. The default value is `txt`.. - -|`--remove` -|Remove the output path if it already exists. The default value is `false`. - -|`--save-to-file` -|Define whether you want to store the output of the connectivity differences in the default file. The default value is `false`. - -|`--strict` -|Treat warnings as errors. The default value is `false`. -|=== \ No newline at end of file +You can report connectivity differences based on two network policy directories and YAML manifests with workload resources. \ No newline at end of file diff --git a/modules/roxctl-netpol-connectivity-map-options.adoc b/modules/roxctl-netpol-connectivity-map-options.adoc new file mode 100644 index 000000000000..fc1e0448f3a4 --- /dev/null +++ b/modules/roxctl-netpol-connectivity-map-options.adoc @@ -0,0 +1,47 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: REFERENCE +[id="roxctl-netpol-connectivity-map-options_{context}"] += Options + +[role="_abstract"] +Options for the `roxctl netpol connectivity map` command. + +The following options are available: + +[cols="2,2",options="header"] +|=== +|Option |Description + +|`--explain` +|Enhance the analysis of permitted connectivity with explanations per denied/allowed connection; supported only for txt output format. + +|`--exposure` +|Enhance the analysis of permitted connectivity by using exposure analysis. The default value is `false`. + +|`--fail` +|Fail on the first encountered error. The default value is `false`. + +|`--focus-workload string` +|Focus on connections of the specified workload name in the output. + +|`-f`, `--output-file string` +|Save the connections list output into a specific file. + +|`-h`, `--help` +|View the help text for the `roxctl netpol connectivity map` command. + +|`-o`, `--output-format string` +|Configure the connections list in a specific format. Supported formats include `txt`, `json`, `md`, `dot`, and `csv`. The default value is `txt`. + +|`--remove` +|Remove the output path if it already exists. The default value is `false`. + +|`--save-to-file` +|Define whether you want to save the output of the connection list in the default file. The default value is `false`. + +|`--strict` +|Treat warnings as errors. The default value is `false`. +|=== diff --git a/modules/roxctl-netpol-connectivity-map-usage.adoc b/modules/roxctl-netpol-connectivity-map-usage.adoc new file mode 100644 index 000000000000..c3ead3db6928 --- /dev/null +++ b/modules/roxctl-netpol-connectivity-map-usage.adoc @@ -0,0 +1,21 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: REFERENCE +[id="roxctl-netpol-connectivity-map-usage_{context}"] += roxctl netpol connectivity map usage + +[role="_abstract"] +Usage syntax for the `roxctl netpol connectivity map` command. + +Enter the following command: + +[source,terminal] +---- +$ roxctl netpol connectivity map [flags] +---- + +where: + +``:: Specifies the path to the directory containing your Kubernetes deployment and service configuration files. diff --git a/modules/roxctl-netpol-connectivity-map.adoc b/modules/roxctl-netpol-connectivity-map.adoc index acc887cb8c36..207def81739e 100644 --- a/modules/roxctl-netpol-connectivity-map.adoc +++ b/modules/roxctl-netpol-connectivity-map.adoc @@ -1,58 +1,10 @@ // Module included in the following assemblies: // -// * command-reference/roxctl-netpol.adoc +// * cli/command-reference/roxctl-netpol.adoc -:_mod-docs-content-type: REFERENCE +:_mod-docs-content-type: CONCEPT [id="roxctl-netpol-connectivity-map_{context}"] = roxctl netpol connectivity map [role="_abstract"] -You can create a connectivity map by using the `netpol` command to analyze connectivity based on the network policies and other resources. - -Enter the following command: - -[source,terminal] ----- -$ roxctl netpol connectivity map [flags] ----- - -where: - -``:: Specifies the path to the directory containing your Kubernetes deployment and service configuration files. - -The following options are available: - -[cols="2,2",options="header"] -|=== -|Option |Description - -|`--explain` -|Enhance the analysis of permitted connectivity with explanations per denied/allowed connection; supported only for txt output format. - -|`--exposure` -|Enhance the analysis of permitted connectivity by using exposure analysis. The default value is `false`. - -|`--fail` -|Fail on the first encountered error. The default value is `false`. - -|`--focus-workload string` -|Focus on connections of the specified workload name in the output. - -|`-f`, `--output-file string` -|Save the connections list output into a specific file. - -|`-h`, `--help` -|View the help text for the `roxctl netpol connectivity map` command. - -|`-o`, `--output-format string` -|Configure the connections list in a specific format. Supported formats include `txt`, `json`, `md`, `dot`, and `csv`. The default value is `txt`. - -|`--remove` -|Remove the output path if it already exists. The default value is `false`. - -|`--save-to-file` -|Define whether you want to save the output of the connection list in the default file. The default value is `false`. - -|`--strict` -|Treat warnings as errors. The default value is `false`. -|=== \ No newline at end of file +You can create a connectivity map by using the `netpol` command to analyze connectivity based on the network policies and other resources. \ No newline at end of file diff --git a/modules/roxctl-netpol-connectivity-usage.adoc b/modules/roxctl-netpol-connectivity-usage.adoc new file mode 100644 index 000000000000..4611b34d876c --- /dev/null +++ b/modules/roxctl-netpol-connectivity-usage.adoc @@ -0,0 +1,16 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: REFERENCE +[id="roxctl-netpol-connectivity-usage_{context}"] += roxctl netpol connectivity usage + +[role="_abstract"] +Usage syntax for the `roxctl netpol connectivity` command. + +.Usage +[source,terminal] +---- +$ roxctl netpol connectivity [flags] +---- diff --git a/modules/roxctl-netpol-connectivity.adoc b/modules/roxctl-netpol-connectivity.adoc index dc90e50f1899..a18133a2ab15 100644 --- a/modules/roxctl-netpol-connectivity.adoc +++ b/modules/roxctl-netpol-connectivity.adoc @@ -1,15 +1,10 @@ // Module included in the following assemblies: // -// * command-reference/roxctl-netpol.adoc +// * cli/command-reference/roxctl-netpol.adoc -:_mod-docs-content-type: REFERENCE +:_mod-docs-content-type: CONCEPT [id="roxctl-netpol-connectivity_{context}"] = roxctl netpol connectivity -Commands related to the connectivity analysis of the network policy resources. - -.Usage -[source,terminal] ----- -$ roxctl netpol connectivity [flags] ----- \ No newline at end of file +[role="_abstract"] +Commands related to the connectivity analysis of the network policy resources. \ No newline at end of file diff --git a/modules/roxctl-netpol-generate-options.adoc b/modules/roxctl-netpol-generate-options.adoc new file mode 100644 index 000000000000..01fd56f28005 --- /dev/null +++ b/modules/roxctl-netpol-generate-options.adoc @@ -0,0 +1,38 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: REFERENCE +[id="roxctl-netpol-generate-options_{context}"] += Options + +[role="_abstract"] +Options for the `roxctl netpol generate` command. + +The following options are available: + +[cols="2,2",options="header"] +|=== +|Option |Description + +|`--dnsport ` +a|Specify the DNS port or a named port that you want to use in the egress rules of synthesized network policies. For example: + +* `roxctl netpol generate --dnsport 5353 ` +* `roxctl netpol generate --dnsport foo-dns `. + +|`--fail` +|Fail on the first encountered error. The default value is `false`. + +|`-d`, `--output-dir string` +|Save generated policies into the target folder. + +|`-f`, `--output-file string` +|Save and merge generated policies into a single YAML file. + +|`--remove` +|Remove the output path if it already exists. The default value is `false`. + +|`--strict` +|Treat warnings as errors. The default value is `false`. +|=== diff --git a/modules/roxctl-netpol-generate-usage.adoc b/modules/roxctl-netpol-generate-usage.adoc new file mode 100644 index 000000000000..8602463021b6 --- /dev/null +++ b/modules/roxctl-netpol-generate-usage.adoc @@ -0,0 +1,21 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: REFERENCE +[id="roxctl-netpol-generate-usage_{context}"] += roxctl netpol generate usage + +[role="_abstract"] +Usage syntax for the `roxctl netpol generate` command. + +Enter the following command: + +[source,terminal] +---- +$ roxctl netpol generate [flags] +---- + +where: + +``:: Specifies the path to the directory containing your Kubernetes deployment and service configuration files. diff --git a/modules/roxctl-netpol-generate.adoc b/modules/roxctl-netpol-generate.adoc index bc3f7627be17..1c96b306f120 100644 --- a/modules/roxctl-netpol-generate.adoc +++ b/modules/roxctl-netpol-generate.adoc @@ -1,53 +1,14 @@ // Module included in the following assemblies: // -// * command-reference/roxctl-netpol.adoc +// * cli/command-reference/roxctl-netpol.adoc -:_mod-docs-content-type: REFERENCE +:_mod-docs-content-type: CONCEPT [id="roxctl-netpol-generate_{context}"] = roxctl netpol generate [role="_abstract"] Recommend network policies based on the deployment information. -Enter the following command: - -[source,terminal] ----- -$ roxctl netpol generate [flags] ----- - -where: - -``:: Specifies the path to the directory containing your Kubernetes deployment and service configuration files. - -The following options are available: - -[cols="2,2",options="header"] -|=== -|Option |Description - -|`--dnsport ` -a|Specify the DNS port or a named port that you want to use in the egress rules of synthesized network policies. For example: - -* `roxctl netpol generate --dnsport 5353 ` -* `roxctl netpol generate --dnsport foo-dns `. - -|`--fail` -|Fail on the first encountered error. The default value is `false`. - -|`-d`, `--output-dir string` -|Save generated policies into the target folder. - -|`-f`, `--output-file string` -|Save and merge generated policies into a single YAML file. - -|`--remove` -|Remove the output path if it already exists. The default value is `false`. - -|`--strict` -|Treat warnings as errors. The default value is `false`. -|=== - If you do not specify a port, the `roxctl netpol generate` command uses port `53` for DNS connections. If you are using {ocp}, you might need to change the port when generating network policies by using the `roxctl` CLI. If you do not change the port, {ocp} uses port `5353` and assigns the name `dns` for this port automatically. You can use the `--dnsport` option to override the default DNS port. For example: diff --git a/modules/roxctl-netpol-overview.adoc b/modules/roxctl-netpol-overview.adoc new file mode 100644 index 000000000000..0d441e6f02ff --- /dev/null +++ b/modules/roxctl-netpol-overview.adoc @@ -0,0 +1,10 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: CONCEPT +[id="roxctl-netpol-overview_{context}"] += roxctl netpol + +[role="_abstract"] +Commands related to the network policies. diff --git a/modules/roxctl-netpol-usage.adoc b/modules/roxctl-netpol-usage.adoc new file mode 100644 index 000000000000..593d2bce138f --- /dev/null +++ b/modules/roxctl-netpol-usage.adoc @@ -0,0 +1,16 @@ +// Module included in the following assemblies: +// +// * cli/command-reference/roxctl-netpol.adoc + +:_mod-docs-content-type: REFERENCE +[id="roxctl-netpol-usage_{context}"] += roxctl netpol usage + +[role="_abstract"] +Usage syntax for the `roxctl netpol` command. + +.Usage +[source,terminal] +---- +$ roxctl netpol [command] [flags] +----