Skip to content

Commit 84d5fac

Browse files
committed
OSDOCS-11830 Split Networking content for ROSA with HCP
1 parent 1de0f04 commit 84d5fac

File tree

48 files changed

+512
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+512
-259
lines changed

_topic_maps/_topic_map_rosa_hcp.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,87 @@ Topics:
10141014
# - Name: Advanced OADP features and functionalities
10151015
# File: oadp-advanced-topics
10161016
---
1017+
Name: Networking
1018+
Dir: networking
1019+
Distros: openshift-rosa-hcp
1020+
Topics:
1021+
- Name: About networking
1022+
File: about-managed-networking
1023+
- Name: Networking Operators
1024+
Dir: networking_operators
1025+
Distros: openshift-rosa-hcp
1026+
Topics:
1027+
- Name: AWS Load Balancer Operator
1028+
File: aws-load-balancer-operator
1029+
- Name: DNS Operator in Red Hat OpenShift Service on AWS
1030+
File: dns-operator
1031+
- Name: Ingress Operator in Red Hat OpenShift Service on AWS
1032+
File: ingress-operator
1033+
- Name: Ingress Node Firewall Operator in Red Hat OpenShift Service on AWS
1034+
File: ingress-node-firewall-operator
1035+
- Name: Network verification
1036+
File: network-verification
1037+
- Name: Configuring a cluster-wide proxy during installation
1038+
File: configuring-cluster-wide-proxy
1039+
- Name: CIDR range definitions
1040+
File: cidr-range-definitions
1041+
- Name: Network security
1042+
Dir: network_security
1043+
Distros: openshift-rosa-hcp
1044+
Topics:
1045+
- Name: Understanding network policy APIs
1046+
File: network-policy-apis
1047+
- Name: Cluster-scoped network policy
1048+
Dir: AdminNetworkPolicy
1049+
Distros: openshift-rosa-hcp
1050+
Topics:
1051+
- Name: About AdminNetworkPolicy
1052+
File: ovn-k-anp
1053+
- Name: About BaselineAdminNetworkPolicy
1054+
File: ovn-k-banp
1055+
- Name: Best practices cluster-wide network policy
1056+
File: ovn-k-anp-recommended-practices
1057+
- Name: Namespace-scoped network policy (NetworkPolicy)
1058+
Dir: network_policy
1059+
Distros: openshift-rosa-hcp
1060+
Topics:
1061+
- Name: About network policy
1062+
File: about-network-policy
1063+
- Name: Creating a network policy
1064+
File: creating-network-policy
1065+
- Name: Viewing a network policy
1066+
File: viewing-network-policy
1067+
- Name: Editing a network policy
1068+
File: editing-network-policy
1069+
- Name: Deleting a network policy
1070+
File: deleting-network-policy
1071+
- Name: Defining a default network policy for projects
1072+
File: default-network-policy
1073+
- Name: Configuring multitenant isolation with network policy
1074+
File: multitenant-network-policy
1075+
# Included for OSDOCS-13465
1076+
- Name: Audit logging for network security
1077+
File: logging-network-security
1078+
# OSDOCS-11830: Omitting egress firewall, ipsec encryption, zero egress
1079+
- Name: Configuring the primary cluster network
1080+
Dir: ovn_kubernetes_network_provider
1081+
Distros: openshift-rosa-hcp
1082+
Topics:
1083+
- Name: About the OVN-Kubernetes network plugin
1084+
File: about-ovn-kubernetes
1085+
# TODO OSDOCS-11830: The only instructional content in this section claims to be unsupported for HCP
1086+
# - Name: Configuring an egress IP address
1087+
# File: configuring-egress-ips-ovn
1088+
# OpenShift SDN not supported for HCP
1089+
- Name: Configuring Routes
1090+
Dir: routes
1091+
Distros: openshift-rosa-hcp
1092+
Topics:
1093+
- Name: Route configuration
1094+
File: route-configuration
1095+
- Name: Secured routes
1096+
File: secured-routes
1097+
---
10171098
Name: Nodes
10181099
Dir: nodes
10191100
Distros: openshift-rosa-hcp

cloud_experts_tutorials/cloud-experts-aws-load-balancer-operator.adoc

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,10 @@ toc::[]
2020

2121
include::snippets/mobb-support-statement.adoc[leveloffset=+1]
2222

23-
ifndef::openshift-rosa-hcp[]
2423
[TIP]
2524
====
2625
Load Balancers created by the AWS Load Balancer Operator cannot be used for xref:../networking/routes/route-configuration.adoc#route-configuration[OpenShift Routes], and should only be used for individual services or ingress resources that do not need the full layer 7 capabilities of an OpenShift Route.
2726
====
28-
endif::openshift-rosa-hcp[]
29-
ifdef::openshift-rosa-hcp[]
30-
[TIP]
31-
====
32-
Load Balancers created by the AWS Load Balancer Operator cannot be used for link:https://docs.openshift.com/rosa/networking/routes/route-configuration.html[OpenShift Routes], and should only be used for individual services or ingress resources that do not need the full layer 7 capabilities of an OpenShift Route.
33-
====
34-
endif::openshift-rosa-hcp[]
3527

3628
The link:https://kubernetes-sigs.github.io/aws-load-balancer-controller/[AWS Load Balancer Controller] manages AWS Elastic Load Balancers for a {product-title} (ROSA) cluster. The controller provisions link:https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html[AWS Application Load Balancers (ALB)] when you create Kubernetes Ingress resources and link:https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html[AWS Network Load Balancers (NLB)] when implementing Kubernetes Service resources with a type of LoadBalancer.
3729

@@ -54,11 +46,12 @@ AWS ALBs require a multi-AZ cluster, as well as three public subnets split acros
5446

5547
ifndef::openshift-rosa-hcp[]
5648
* xref:../rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-quickly.adoc#rosa-sts-creating-a-cluster-quickly[A multi-AZ ROSA classic cluster]
49+
* BYO VPC cluster
50+
//Moved inside ifndef since this is always true for HCP clusters
5751
endif::openshift-rosa-hcp[]
5852
ifdef::openshift-rosa-hcp[]
59-
* link:https://docs.openshift.com/rosa-hcp/rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.html[A multi-AZ ROSA cluster]
53+
* xref:../rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc#rosa-hcp-sts-creating-a-cluster-quickly[A multi-AZ {hcp-title} cluster]
6054
endif::openshift-rosa-hcp[]
61-
* BYO VPC cluster
6255
* AWS CLI
6356
* OC CLI
6457

@@ -123,6 +116,7 @@ $ aws ec2 create-tags \
123116
--tags Key=kubernetes.io/role/internal-elb,Value='' \
124117
--region ${REGION}
125118
----
119+
//subnets are tagged already after rosa create network
126120

127121
[id="installation_{context}"]
128122
== Installation
@@ -355,6 +349,8 @@ $ curl "http://${INGRESS}"
355349
----
356350
Hello OpenShift!
357351
----
352+
//TODO OSDOCS-11830: Couldn't get either of these validation checks to work, Andy R indicated that the related error seems to be that user is not authorized to do operation elasticloadbalancing:AddTags because "no identity based policy allows elasticloadbalancing:AddTags" however the linked policy does seem to allow that as far as I can tell: https://raw.githubusercontent.com/rh-mobb/documentation/main/content/rosa/aws-load-balancer-operator/load-balancer-operator-policy.json
353+
// That said, I'm not sure we should be getting our example policy from the rh-mobb repo
358354

359355
. Deploy an AWS NLB for your hello world application:
360356
+

microshift_configuring/microshift-nw-ipv6-config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ include::modules/microshift-nw-ipv6-dual-stack-migrating-config.adoc[leveloffset
1919
include::modules/microshift-nw-ipv6-dual-stack-reset-ipfam.adoc[leveloffset=+1]
2020

2121
//OCP module, edit with conditionals and care
22-
include::modules/nw-ovn-kuberentes-limitations.adoc[leveloffset=+1]
22+
include::modules/nw-ovn-kubernetes-limitations.adoc[leveloffset=+1]
2323

2424
[id="additional-resources_microshift-ipv6-config_{context}"]
2525
[role="_additional-resources"]

modules/albo-installation.adoc

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[id="aws-load-balancer-operator-installation_{context}"]
55
= Installing the AWS Load Balancer Operator
66

7-
After setting up your environment with your cluster, you can install the AWS Load Balancer Operator using the CLI.
7+
You can install the AWS Load Balancer Operator using the OpenShift CLI (`oc`). Use the same terminal session you used in _Setting up your environment to install the AWS Load Balancer Operator_ to make use of the environment variables.
88

99
.Procedure
1010
. Create a new project within your cluster for the AWS Load Balancer Operator:
@@ -14,29 +14,24 @@ After setting up your environment with your cluster, you can install the AWS Loa
1414
$ oc new-project aws-load-balancer-operator
1515
----
1616

17-
. Create an AWS IAM policy for the AWS Load Balancer Controller:
17+
// TODO OSDOCS-11830 This policy looks like we can add tags but the deployment still complains of having no identity based policy that allows it - found the upstream 2.12.0 version of this IAM Policy and it does contain a number of extra things including ModifyIppools and some wildly different conditions on AddTags
18+
. Create an AWS IAM policy for the AWS Load Balancer Controller.
19+
.. Download the appropriate IAM policy:
1820
+
19-
[NOTE]
20-
====
21-
You can find the AWS IAM policy from link:https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.4/docs/install/iam_policy.json[the upstream AWS Load Balancer Controller policy]. This policy includes all of the permissions you needed by the Operator to function.
22-
====
21+
----
22+
wget -O "${SCRATCH}/load-balancer-operator-policy.json" \
23+
https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.12.0/docs/install/iam_policy.json
24+
----
25+
.. Create the policy and set up an environment variable for the policy ARN by running the following command:
2326
+
2427
[source,terminal]
2528
----
26-
$ POLICY_ARN=$(aws iam list-policies --query \
27-
"Policies[?PolicyName=='aws-load-balancer-operator-policy'].{ARN:Arn}" \
28-
--output text)
29-
$ if [[ -z "${POLICY_ARN}" ]]; then
30-
wget -O "${SCRATCH}/load-balancer-operator-policy.json" \
31-
https://raw.githubusercontent.com/rh-mobb/documentation/main/content/rosa/aws-load-balancer-operator/load-balancer-operator-policy.json
32-
POLICY_ARN=$(aws --region "$REGION" --query Policy.Arn \
29+
POLICY_ARN=$(aws --region "$REGION" --query Policy.Arn \
3330
--output text iam create-policy \
3431
--policy-name aws-load-balancer-operator-policy \
3532
--policy-document "file://${SCRATCH}/load-balancer-operator-policy.json")
36-
fi
37-
$ echo $POLICY_ARN
3833
----
39-
+
34+
4035
. Create an AWS IAM trust policy for AWS Load Balancer Operator:
4136
+
4237
[source,terminal]
@@ -53,28 +48,32 @@ $ cat <<EOF > "${SCRATCH}/trust-policy.json"
5348
}
5449
},
5550
"Principal": {
56-
"Federated": "arn:aws:iam::$AWS_ACCOUNT_ID:oidc-provider/${OIDC_ENDPOINT}"
51+
"Federated": "arn:aws:iam::${AWS_ACCOUNT_ID}:oidc-provider/${OIDC_ENDPOINT}"
5752
},
5853
"Action": "sts:AssumeRoleWithWebIdentity"
5954
}
6055
]
6156
}
6257
EOF
6358
----
64-
+
59+
6560
. Create an AWS IAM role for the AWS Load Balancer Operator:
6661
+
6762
[source,terminal]
6863
----
69-
$ ROLE_ARN=$(aws iam create-role --role-name "${ROSA_CLUSTER_NAME}-alb-operator" \
64+
$ ROLE_ARN=$(aws iam create-role --role-name "${CLUSTER_NAME}-alb-operator" \
7065
--assume-role-policy-document "file://${SCRATCH}/trust-policy.json" \
7166
--query Role.Arn --output text)
67+
----
68+
----
7269
$ echo $ROLE_ARN
73-
74-
$ aws iam attach-role-policy --role-name "${ROSA_CLUSTER_NAME}-alb-operator" \
70+
----
71+
----
72+
$ aws iam attach-role-policy --role-name "${CLUSTER_NAME}-alb-operator" \
7573
--policy-arn $POLICY_ARN
7674
----
77-
+
75+
//aws iam put-role-policy --role-name ${CLUSTER_NAME}-albo-operator --policy-name perms-policy-albo-operator --policy-document file://albo-operator-permission-policy.json
76+
7877
. Create a secret for the AWS Load Balancer Operator to assume our newly created AWS IAM role:
7978
+
8079
[source,terminal]
@@ -92,7 +91,7 @@ stringData:
9291
web_identity_token_file = /var/run/secrets/openshift/serviceaccount/token
9392
EOF
9493
----
95-
+
94+
9695
. Install the AWS Load Balancer Operator:
9796
+
9897
[source,terminal]
@@ -117,11 +116,15 @@ spec:
117116
name: aws-load-balancer-operator
118117
source: redhat-operators
119118
sourceNamespace: openshift-marketplace
120-
startingCSV: aws-load-balancer-operator.v1.0.0
119+
startingCSV: aws-load-balancer-operator.v1.0.1
120+
config:
121+
env:
122+
- name: ROLEARN
123+
value: "${ROLE_ARN}"
121124
EOF
122125
----
123-
+
124-
. Deploy an instance of the AWS Load Balancer Controller using the Operator:
126+
127+
. Deploy an instance of the AWS Load Balancer Controller using the Operator.
125128
+
126129
[NOTE]
127130
====
@@ -134,22 +137,23 @@ $ cat << EOF | oc apply -f -
134137
apiVersion: networking.olm.openshift.io/v1
135138
kind: AWSLoadBalancerController
136139
metadata:
137-
name: cluster
140+
name: cluster
138141
spec:
139-
credentials:
140-
name: aws-load-balancer-operator
142+
credentialsRequestConfig:
143+
stsIAMRoleARN: ${ROLE_ARN}
141144
EOF
142145
----
143-
+
146+
144147
. Check the that the Operator and controller pods are both running:
145148
+
146149
[source,terminal]
147150
----
148151
$ oc -n aws-load-balancer-operator get pods
149152
----
150153
+
151-
You should see the following, if not wait a moment and retry:
154+
If you do not see output similar to the following, wait a few moments and retry.
152155
+
156+
.Example output
153157
[source,terminal]
154158
----
155159
NAME READY STATUS RESTARTS AGE
@@ -166,14 +170,14 @@ aws-load-balancer-operator-controller-manager-577d9ffcb9-w6zqn 2/2 Running
166170
----
167171
$ oc new-project hello-world
168172
----
169-
+
173+
170174
. Deploy a hello world application:
171175
+
172176
[source,terminal]
173177
----
174178
$ oc new-app -n hello-world --image=docker.io/openshift/hello-openshift
175179
----
176-
+
180+
177181
. Configure a NodePort service for the AWS ALB to connect to:
178182
+
179183
[source,terminal]
@@ -194,7 +198,7 @@ spec:
194198
deployment: hello-openshift
195199
EOF
196200
----
197-
+
201+
198202
. Deploy an AWS ALB using the AWS Load Balancer Operator:
199203
+
200204
[source,terminal]
@@ -221,8 +225,8 @@ spec:
221225
number: 80
222226
EOF
223227
----
224-
+
225-
. Curl the AWS ALB Ingress endpoint to verify the hello world application is accessible:
228+
229+
. Use Curl to access the AWS ALB Ingress endpoint to verify the hello world application is accessible:
226230
+
227231
[NOTE]
228232
====
@@ -266,7 +270,7 @@ spec:
266270
deployment: hello-openshift
267271
EOF
268272
----
269-
+
273+
270274
. Test the AWS NLB endpoint:
271275
+
272276
[NOTE]

0 commit comments

Comments
 (0)