diff --git a/_topic_maps/_topic_map_ms.yml b/_topic_maps/_topic_map_ms.yml index 4b72e1fa62..44c45f61d8 100644 --- a/_topic_maps/_topic_map_ms.yml +++ b/_topic_maps/_topic_map_ms.yml @@ -409,6 +409,10 @@ Topics: File: microshift-network-policy-index - Name: Creating network policies File: microshift-creating-network-policy + - Name: Editing network policies + File: microshift-editing-network-policy + - Name: Deleting network policies + File: microshift-deleting-network-policy - Name: Firewall configuration File: microshift-firewall - Name: Networking settings for fully disconnected hosts diff --git a/microshift_networking/microshift-network-policy/microshift-deleting-network-policy.adoc b/microshift_networking/microshift-network-policy/microshift-deleting-network-policy.adoc new file mode 100644 index 0000000000..1bac9ceecb --- /dev/null +++ b/microshift_networking/microshift-network-policy/microshift-deleting-network-policy.adoc @@ -0,0 +1,12 @@ +:_mod-docs-content-type: ASSEMBLY +[id="microshift-deleting-network-policy"] += Deleting a network policy +include::_attributes/common-attributes.adoc[] +include::_attributes/attributes-microshift.adoc[] +:context: microshift-deleting-network-policy + +toc::[] + +You can delete a network policy from a namespace. + +include::modules/nw-networkpolicy-delete-cli.adoc[leveloffset=+1] diff --git a/microshift_networking/microshift-network-policy/microshift-editing-network-policy.adoc b/microshift_networking/microshift-network-policy/microshift-editing-network-policy.adoc new file mode 100644 index 0000000000..c235104629 --- /dev/null +++ b/microshift_networking/microshift-network-policy/microshift-editing-network-policy.adoc @@ -0,0 +1,15 @@ +:_mod-docs-content-type: ASSEMBLY +[id="microshift-editing-network-policy"] += Editing a network policy +include::_attributes/attributes-microshift.adoc[] +include::_attributes/common-attributes.adoc[] +:context: microshift-editing-network-policy + +toc::[] + +You can edit an existing network policy for a namespace. Typical edits might include changes to the pods to which the policy applies, allowed ingress traffic, and the destination ports on which to accept traffic. The `apiVersion`, `kind`, and `name` fields must not be changed when editing `NetworkPolicy` objects, as these define the resource itself. + +//OCP modules, edit using conditionals +include::modules/nw-networkpolicy-edit.adoc[leveloffset=+1] + +include::modules/nw-networkpolicy-object.adoc[leveloffset=+1] diff --git a/modules/nw-networkpolicy-delete-cli.adoc b/modules/nw-networkpolicy-delete-cli.adoc index 5626c94cb7..502efd7683 100644 --- a/modules/nw-networkpolicy-delete-cli.adoc +++ b/modules/nw-networkpolicy-delete-cli.adoc @@ -2,6 +2,7 @@ // // * networking/network_policy/deleting-network-policy.adoc // * networking/multiple_networks/configuring-multi-network-policy.adoc +// * microshift_networking/microshift-network-policy/microshift-editing-network-policy.adoc :name: network :role: admin @@ -17,18 +18,21 @@ endif::[] You can delete a {name} policy in a namespace. -ifndef::multi[] +ifndef::multi,microshift[] [NOTE] ==== If you log in with a user with the `cluster-admin` role, then you can delete any network policy in the cluster. ==== -endif::multi[] +endif::multi,microshift[] .Prerequisites - +ifndef::microshift[] * Your cluster uses a network plugin that supports `NetworkPolicy` objects, such as the OVN-Kubernetes network plugin or the OpenShift SDN network plugin with `mode: NetworkPolicy` set. This mode is the default for OpenShift SDN. +endif::microshift[] * You installed the OpenShift CLI (`oc`). +ifndef::microshift[] * You are logged in to the cluster with a user with `{role}` privileges. +endif::microshift[] * You are working in the namespace where the {name} policy exists. .Procedure @@ -64,7 +68,9 @@ endif::multi[] :!name: :!role: +ifndef::microshift[] [NOTE] ==== If you log in to the web console with `cluster-admin` privileges, you have a choice of deleting a network policy in any namespace in the cluster directly in YAML or from the policy in the web console through the *Actions* menu. ==== +endif::microshift[] \ No newline at end of file diff --git a/modules/nw-networkpolicy-edit.adoc b/modules/nw-networkpolicy-edit.adoc index ff89f4f133..6450a5f639 100644 --- a/modules/nw-networkpolicy-edit.adoc +++ b/modules/nw-networkpolicy-edit.adoc @@ -1,6 +1,7 @@ // Module included in the following assemblies: // // * networking/network_policy/editing-network-policy.adoc +// * microshift_networking/microshift-network-policy/microshift-editing-network-policy.adoc :name: network :role: admin @@ -16,18 +17,21 @@ endif::[] You can edit a {name} policy in a namespace. -ifndef::multi[] +ifndef::multi,microshift[] [NOTE] ==== If you log in with a user with the `cluster-admin` role, then you can edit a network policy in any namespace in the cluster. ==== -endif::multi[] +endif::multi,microshift[] .Prerequisites - +ifndef::microshift[] * Your cluster uses a network plugin that supports `NetworkPolicy` objects, such as the OVN-Kubernetes network plugin or the OpenShift SDN network plugin with `mode: NetworkPolicy` set. This mode is the default for OpenShift SDN. +endif::microshift[] * You installed the OpenShift CLI (`oc`). +ifndef::microshift[] * You are logged in to the cluster with a user with `{role}` privileges. +endif::microshift[] * You are working in the namespace where the {name} policy exists. .Procedure @@ -95,7 +99,9 @@ endif::multi[] :!name: :!role: +ifndef::microshift[] [NOTE] ==== If you log in to the web console with `cluster-admin` privileges, you have a choice of editing a network policy in any namespace in the cluster directly in YAML or from the policy in the web console through the *Actions* menu. ==== +endif::microshift[] \ No newline at end of file diff --git a/modules/nw-networkpolicy-object.adoc b/modules/nw-networkpolicy-object.adoc index d82bce5832..ca2f9f1d39 100644 --- a/modules/nw-networkpolicy-object.adoc +++ b/modules/nw-networkpolicy-object.adoc @@ -5,6 +5,7 @@ // * networking/network_policy/editing-network-policy.adoc // * post_installation_configuration/network-configuration.adoc // * microshift_networking/microshift-creating-network-policy.adoc +// * microshift_networking/microshift-network-policy/microshift-editing-network-policy.adoc :_mod-docs-content-type: REFERENCE [id="nw-networkpolicy-object_{context}"]