Skip to content

Commit 1e9ee31

Browse files
authored
Merge pull request #97582 from dfitzmau/OSDOCS-15470-18
[enterprise-4.18] OSDOCS-15470-security: Removed unneccessary code blocks for net secur…
2 parents d50d607 + 25fc3b3 commit 1e9ee31

15 files changed

+67
-165
lines changed

installing/installing_aws/ipi/installing-aws-localzone.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ AWS {zone-type} is an infrastructure that place Cloud Resources close to metropo
2121
+
2222
[WARNING]
2323
====
24-
If you have an AWS profile stored on your computer, it must not use a temporary session token that you generated while using a multi-factor authentication device. The cluster continues to use your current AWS credentials to create AWS resources for the entire life of the cluster, so you must use key-based, long-term credentials. To generate appropriate keys, see link:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html[Managing Access Keys for IAM Users] in the AWS documentation. You can supply the keys when you run the installation program.
24+
If you have an AWS profile stored on your computer, it must not use a temporary session token that you generated while using a multifactor authentication device. The cluster continues to use your current AWS credentials to create AWS resources for the entire life of the cluster, so you must use key-based, long-term credentials. To generate appropriate keys, see link:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html[Managing Access Keys for IAM Users] in the AWS documentation. You can supply the keys when you run the installation program.
2525
====
2626
* You downloaded the AWS CLI and installed it on your computer. See link:https://docs.aws.amazon.com/cli/latest/userguide/install-bundle.html[Install the AWS CLI Using the Bundled Installer (Linux, macOS, or UNIX)] in the AWS documentation.
2727
* If you use a firewall, you xref:../../../installing/install_config/configuring-firewall.adoc#configuring-firewall[configured it to allow the sites] that your cluster must access.
2828
* You noted the region and supported link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/locations[AWS Local Zones locations] to create the network resources in.
2929
* You read the link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/features/[AWS Local Zones features] in the AWS documentation.
30-
* You added permissions for creating network resources that support AWS Local Zones to the Identity and Access Management (IAM) user or role. The following example enables a zone group that can provide a user or role access for creating network network resources that support AWS {zone-type}.
30+
* You added permissions for creating network resources that support AWS Local Zones to the Identity and Access Management (IAM) user or role. The following example enables a zone group that can give a user or role access for creating network resources that support AWS {zone-type}.
3131
+
3232
.Example of an additional IAM policy with the `ec2:ModifyAvailabilityZoneGroup` permission attached to an IAM user or role.
3333
+
@@ -137,22 +137,22 @@ include::modules/install-creating-install-config-aws-edge-zones.adoc[leveloffset
137137
[id="creating-aws-local-zone-environment-existing_{context}"]
138138
== Installing a cluster in an existing VPC that has Local Zone subnets
139139

140-
You can install a cluster into an existing Amazon Virtual Private Cloud (VPC) on Amazon Web Services (AWS). The installation program provisions the rest of the required infrastructure, which you can further customize. To customize the installation, modify parameters in the `install-config.yaml` file before you install the cluster.
140+
You can install a cluster into an existing Amazon Virtual Private Cloud (VPC) on Amazon Web Services (AWS). The installation program provisions the rest of the required infrastructure, which you can further customize. To customize the installation, change parameters in the `install-config.yaml` file before you install the cluster.
141141

142142
Installing a cluster on AWS into an existing VPC requires extending compute nodes to the edge of the Cloud Infrastructure by using AWS {zone-type}.
143143

144144
Local Zone subnets extend regular compute nodes to edge networks. Each edge compute nodes runs a user workload. After you create an Amazon Web Service (AWS) Local Zone environment, and you deploy your cluster, you can use edge compute nodes to create user workloads in Local Zone subnets.
145145

146146
[NOTE]
147147
====
148-
If you want to create private subnets, you must either modify the provided CloudFormation template or create your own template.
148+
If you want to create private subnets, you must either change the provided CloudFormation template or create your own template.
149149
====
150150

151-
You can use a provided CloudFormation template to create network resources. Additionally, you can modify a template to customize your infrastructure or use the information that they contain to create AWS resources according to your company's policies.
151+
You can use a provided CloudFormation template to create network resources. Additionally, you can change a template to customize your infrastructure or use the information that they contain to create AWS resources according to your company's policies.
152152

153153
[IMPORTANT]
154154
====
155-
The steps for performing an installer-provisioned infrastructure installation are provided for example purposes only. Installing a cluster in an existing VPC requires that you have knowledge of the cloud provider and the installation process of {product-title}. You can use a CloudFormation template to assist you with completing these steps or to help model your own cluster installation. Instead of using the CloudFormation template to create resources, you can decide to use other methods for generating these resources.
155+
The documentation provides the steps for performing an installer-provisioned infrastructure installation for example purposes only. Installing a cluster in an existing VPC requires that you have knowledge of the cloud provider and the installation process of {product-title}. You can use a CloudFormation template to assist you with completing these steps or to help model your own cluster installation. Instead of using the CloudFormation template to create resources, you can decide to use other methods for generating these resources.
156156
====
157157

158158
// Creating a VPC in AWS

modules/cnf-performing-end-to-end-tests-junit-test-output.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ You must create the `junit` folder before running this command.
2727
----
2828
$ podman run -v $(pwd)/:/kubeconfig:Z -v $(pwd)/junit:/junit \
2929
-e KUBECONFIG=/kubeconfig/kubeconfig registry.redhat.io/openshift4/cnf-tests-rhel9:v{product-version} \
30-
/usr/bin/test-run.sh --ginkgo.junit-report junit/<file-name>.xml --ginkgo.v
30+
/usr/bin/test-run.sh --ginkgo.junit-report junit/<file_name>.xml --ginkgo.v
3131
----
3232
+
3333
where:
3434
+
3535
--
36-
`junit` :: Is the folder where the junit report is stored.
36+
`file_name` :: The name of the XML report file.
3737
--

modules/nw-egressnetworkpolicy-create.adoc

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,7 @@ policy rules.
4444
$ oc create -f <policy_name>.yaml -n <project>
4545
----
4646
+
47-
In the following example, a new {kind} object is created in a project named `project1`:
48-
+
49-
[source,terminal]
50-
----
51-
$ oc create -f default.yaml -n project1
52-
----
53-
+
54-
.Example output
55-
[source,terminal,subs="attributes"]
56-
----
57-
{obj} created
58-
----
47+
Successful output lists the {obj} name and the `created` status.
5948

6049
. Optional: Save the `<policy_name>.yaml` file so that you can make changes later.
6150

modules/nw-networkpolicy-allow-application-all-namespaces.adoc

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ifndef::microshift[]
3131
endif::microshift[]
3232
* You installed the OpenShift CLI (`oc`).
3333
ifndef::microshift[]
34-
* You are logged in to the cluster with a user with `{role}` privileges.
34+
* You logged in to the cluster with a user with `{role}` privileges.
3535
endif::microshift[]
3636
* You are working in the namespace that the {name} policy applies to.
3737

@@ -71,7 +71,7 @@ spec:
7171
+
7272
[NOTE]
7373
====
74-
By default, if you omit specifying a `namespaceSelector` it does not select any namespaces, which means the policy allows traffic only from the namespace the network policy is deployed to.
74+
By default, if you do not specify a `namespaceSelector` parameter in the policy object, no namespaces get selected. This means the policy allows traffic only from the namespace where the network policy deployes.
7575
====
7676

7777
. Apply the policy by entering the following command:
@@ -81,16 +81,7 @@ By default, if you omit specifying a `namespaceSelector` it does not select any
8181
$ oc apply -f web-allow-all-namespaces.yaml
8282
----
8383
+
84-
.Example output
85-
[source,terminal]
86-
----
87-
ifndef::multi[]
88-
networkpolicy.networking.k8s.io/web-allow-all-namespaces created
89-
endif::multi[]
90-
ifdef::multi[]
91-
multinetworkpolicy.k8s.cni.cncf.io/web-allow-all-namespaces created
92-
endif::multi[]
93-
----
84+
Successful output lists the name of the policy object and the `created` status.
9485

9586
.Verification
9687

@@ -108,7 +99,7 @@ $ oc run web --namespace=default --image=nginx --labels="app=web" --expose --por
10899
$ oc run test-$RANDOM --namespace=secondary --rm -i -t --image=alpine -- sh
109100
----
110101

111-
. Run the following command in the shell and observe that the request is allowed:
102+
. Run the following command in the shell and observe that the service allows the request:
112103
+
113104
[source,terminal]
114105
----

modules/nw-networkpolicy-allow-application-particular-namespace.adoc

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ endif::microshift[]
2525

2626
Follow this procedure to configure a policy that allows traffic to a pod with the label `app=web` from a particular namespace. You might want to do this to:
2727

28-
* Restrict traffic to a production database only to namespaces where production workloads are deployed.
28+
* Restrict traffic to a production database only to namespaces that have production workloads deployed.
2929
* Enable monitoring tools deployed to a particular namespace to scrape metrics from the current namespace.
3030
3131
.Prerequisites
@@ -34,7 +34,7 @@ ifndef::microshift[]
3434
endif::microshift[]
3535
* You installed the OpenShift CLI (`oc`).
3636
ifndef::microshift[]
37-
* You are logged in to the cluster with a user with `{role}` privileges.
37+
* You logged in to the cluster with a user with `{role}` privileges.
3838
endif::microshift[]
3939
* You are working in the namespace that the {name} policy applies to.
4040

@@ -81,16 +81,7 @@ spec:
8181
$ oc apply -f web-allow-prod.yaml
8282
----
8383
+
84-
.Example output
85-
[source,terminal]
86-
----
87-
ifndef::multi[]
88-
networkpolicy.networking.k8s.io/web-allow-prod created
89-
endif::multi[]
90-
ifdef::multi[]
91-
multinetworkpolicy.k8s.cni.cncf.io/web-allow-prod created
92-
endif::multi[]
93-
----
84+
Successful output lists the name of the policy object and the `created` status.
9485

9586
.Verification
9687

@@ -136,19 +127,12 @@ $ oc label namespace/dev purpose=testing
136127
$ oc run test-$RANDOM --namespace=dev --rm -i -t --image=alpine -- sh
137128
----
138129

139-
. Run the following command in the shell and observe that the request is blocked:
130+
. Run the following command in the shell and observe the reason for the blocked request. For example, expected output states `wget: download timed out`.
140131
+
141132
[source,terminal]
142133
----
143134
# wget -qO- --timeout=2 http://web.default
144135
----
145-
+
146-
.Expected output
147-
+
148-
[source,terminal]
149-
----
150-
wget: download timed out
151-
----
152136

153137
. Run the following command to deploy an `alpine` image in the `prod` namespace and start a shell:
154138
+

modules/nw-networkpolicy-allow-external-clients.adoc

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ifndef::microshift[]
3838
endif::microshift[]
3939
* You installed the OpenShift CLI (`oc`).
4040
ifndef::microshift[]
41-
* You are logged in to the cluster with a user with `{role}` privileges.
41+
* You logged in to the cluster with a user with `{role}` privileges.
4242
endif::microshift[]
4343
* You are working in the namespace that the {name} policy applies to.
4444

@@ -80,17 +80,7 @@ spec:
8080
$ oc apply -f web-allow-external.yaml
8181
----
8282
+
83-
.Example output
84-
+
85-
[source,terminal]
86-
----
87-
ifndef::multi[]
88-
networkpolicy.networking.k8s.io/web-allow-external created
89-
endif::multi[]
90-
ifdef::multi[]
91-
multinetworkpolicy.k8s.cni.cncf.io/web-allow-external created
92-
endif::multi[]
93-
----
83+
Successful output lists the name of the policy object and the `created` status.
9484
ifndef::microshift[]
9585
This policy allows traffic from all resources, including external traffic as illustrated in the following diagram:
9686

modules/nw-networkpolicy-audit-configure.adoc

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $ oc edit network.operator.openshift.io/cluster
2424
+
2525
[TIP]
2626
====
27-
You can alternatively customize and apply the following YAML to configure audit logging:
27+
You can also customize and apply the following YAML to configure audit logging:
2828
2929
[source,yaml]
3030
----
@@ -60,11 +60,7 @@ metadata:
6060
EOF
6161
----
6262
+
63-
.Example output
64-
[source,text]
65-
----
66-
namespace/verify-audit-logging created
67-
----
63+
Successful output lists the namespace with the network policy and the `created` status.
6864
6965
.. Create network policies for the namespace:
7066
+
@@ -150,12 +146,7 @@ EOF
150146
done
151147
----
152148
+
153-
.Example output
154-
[source,text]
155-
----
156-
pod/client created
157-
pod/server created
158-
----
149+
Successful output lists the two pods, such as `pod/client` and `pod/server`, and the `created` status.
159150
160151
. To generate traffic and produce network policy audit log entries, complete the following steps:
161152
@@ -166,7 +157,7 @@ pod/server created
166157
$ POD_IP=$(oc get pods server -n verify-audit-logging -o jsonpath='{.status.podIP}')
167158
----
168159
169-
.. Ping the IP address from the previous command from the pod named `client` in the `default` namespace and confirm that all packets are dropped:
160+
.. Ping the IP address from an earlier command from the pod named `client` in the `default` namespace and confirm the all packets are dropped:
170161
+
171162
[source,terminal]
172163
----
@@ -182,7 +173,7 @@ PING 10.128.2.55 (10.128.2.55) 56(84) bytes of data.
182173
2 packets transmitted, 0 received, 100% packet loss, time 2041ms
183174
----
184175
185-
.. Ping the IP address saved in the `POD_IP` shell environment variable from the pod named `client` in the `verify-audit-logging` namespace and confirm that all packets are allowed:
176+
.. From the client pod in the `verify-audit-logging` namespace, ping the IP address stored in the `POD_IP shell` environment variable and confirm the system allows all packets.
186177
+
187178
[source,terminal]
188179
----

modules/nw-networkpolicy-audit-disable.adoc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ where:
3030
+
3131
[TIP]
3232
====
33-
You can alternatively apply the following YAML to disable audit logging:
33+
You can also apply the following YAML to disable audit logging:
3434

3535
[source,yaml]
3636
----
@@ -43,8 +43,4 @@ metadata:
4343
----
4444
====
4545
+
46-
.Example output
47-
[source,terminal]
48-
----
49-
namespace/verify-audit-logging annotated
50-
----
46+
Successful output lists the audit logging name and the `annotated` status.

modules/nw-networkpolicy-audit-enable.adoc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ where:
3131
+
3232
[TIP]
3333
====
34-
You can alternatively apply the following YAML to enable audit logging:
34+
You can also apply the following YAML to enable audit logging:
3535

3636
[source,yaml]
3737
----
@@ -48,11 +48,7 @@ metadata:
4848
----
4949
====
5050
+
51-
.Example output
52-
[source,terminal]
53-
----
54-
namespace/verify-audit-logging annotated
55-
----
51+
Successful output lists the audit logging name and the `annotated` status.
5652
5753
.Verification
5854

modules/nw-networkpolicy-create-cli.adoc

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ifndef::microshift[]
3232
endif::microshift[]
3333
* You installed the OpenShift CLI (`oc`).
3434
ifndef::microshift[]
35-
* You are logged in to the cluster with a user with `{role}` privileges.
35+
* You logged in to the cluster with a user with `{role}` privileges.
3636
endif::microshift[]
3737
* You are working in the namespace that the {name} policy applies to.
3838

@@ -123,7 +123,7 @@ endif::multi[]
123123
+
124124
.Allow ingress traffic to one pod from a particular namespace
125125
+
126-
This policy allows traffic to pods labelled `pod-a` from pods running in `namespace-y`.
126+
This policy allows traffic to pods that have the `pod-a` label from pods running in `namespace-y`.
127127
+
128128
[source,yaml]
129129
----
@@ -221,29 +221,20 @@ $ oc apply -f <policy_name>.yaml -n <namespace>
221221
where:
222222

223223
`<policy_name>`:: Specifies the {name} policy file name.
224-
`<namespace>`:: Optional: Specifies the namespace if the object is defined in a different namespace than the current namespace.
224+
`<namespace>`:: Optional parameter. If you defined the object in a different namespace than the current namespace, the parameter specifices the namespace.
225225
--
226226
+
227-
.Example output
228-
[source,terminal]
229-
----
230-
ifndef::multi[]
231-
networkpolicy.networking.k8s.io/deny-by-default created
232-
endif::multi[]
233-
ifdef::multi[]
234-
multinetworkpolicy.k8s.cni.cncf.io/deny-by-default created
235-
endif::multi[]
236-
----
237-
238-
ifdef::multi[]
239-
:!multi:
240-
endif::multi[]
241-
:!name:
242-
:!role:
227+
Successful output lists the name of the policy object and the `created` status.
243228

244229
ifndef::microshift[]
245230
[NOTE]
246231
====
247232
If you log in to the web console with `cluster-admin` privileges, you have a choice of creating a network policy in any namespace in the cluster directly in YAML or from a form in the web console.
248233
====
249-
endif::microshift[]
234+
endif::microshift[]
235+
236+
ifdef::multi[]
237+
:!multi:
238+
endif::multi[]
239+
:!name:
240+
:!role:

0 commit comments

Comments
 (0)