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
38 changes: 21 additions & 17 deletions cli/command-reference/roxctl-netpol.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
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]
21 changes: 21 additions & 0 deletions modules/roxctl-netpol-available-commands.adoc
Original file line number Diff line number Diff line change
@@ -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.
|===
39 changes: 39 additions & 0 deletions modules/roxctl-netpol-connectivity-diff-options.adoc
Original file line number Diff line number Diff line change
@@ -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`.
|===
16 changes: 16 additions & 0 deletions modules/roxctl-netpol-connectivity-diff-usage.adoc
Original file line number Diff line number Diff line change
@@ -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]
----
42 changes: 3 additions & 39 deletions modules/roxctl-netpol-connectivity-diff.adoc
Original file line number Diff line number Diff line change
@@ -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`.
|===
You can report connectivity differences based on two network policy directories and YAML manifests with workload resources.
47 changes: 47 additions & 0 deletions modules/roxctl-netpol-connectivity-map-options.adoc
Original file line number Diff line number Diff line change
@@ -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`.
|===
21 changes: 21 additions & 0 deletions modules/roxctl-netpol-connectivity-map-usage.adoc
Original file line number Diff line number Diff line change
@@ -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 <folder_path> [flags]
----

where:

`<folder_path>`:: Specifies the path to the directory containing your Kubernetes deployment and service configuration files.
54 changes: 3 additions & 51 deletions modules/roxctl-netpol-connectivity-map.adoc
Original file line number Diff line number Diff line change
@@ -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 <folder_path> [flags]
----

where:

`<folder_path>`:: 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`.
|===
You can create a connectivity map by using the `netpol` command to analyze connectivity based on the network policies and other resources.
16 changes: 16 additions & 0 deletions modules/roxctl-netpol-connectivity-usage.adoc
Original file line number Diff line number Diff line change
@@ -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]
----
13 changes: 4 additions & 9 deletions modules/roxctl-netpol-connectivity.adoc
Original file line number Diff line number Diff line change
@@ -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]
----
[role="_abstract"]
Commands related to the connectivity analysis of the network policy resources.
Loading