Skip to content

Commit 3efb15e

Browse files
committed
OSDOCS-11830 Split Networking content for ROSA with HCP
1 parent 7a50009 commit 3efb15e

27 files changed

+320
-125
lines changed

_topic_maps/_topic_map_rosa_hcp.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,84 @@ Topics:
10121012
# - Name: Advanced OADP features and functionalities
10131013
# File: oadp-advanced-topics
10141014
---
1015+
Name: Networking
1016+
Dir: networking
1017+
Distros: openshift-rosa-hcp
1018+
Topics:
1019+
- Name: About networking
1020+
File: about-managed-networking
1021+
- Name: Networking Operators
1022+
Dir: networking_operators
1023+
Distros: openshift-rosa-hcp
1024+
Topics:
1025+
- Name: AWS Load Balancer Operator
1026+
File: aws-load-balancer-operator
1027+
- Name: DNS Operator in Red Hat OpenShift Service on AWS
1028+
File: dns-operator
1029+
# TODO OSDOCS-11830: Unable to locate in OperatorHub for ROSA with HCP cluster
1030+
# - Name: Ingress Operator in Red Hat OpenShift Service on AWS
1031+
# File: ingress-operator
1032+
- Name: Ingress Node Firewall Operator in Red Hat OpenShift Service on AWS
1033+
File: ingress-node-firewall-operator
1034+
- Name: Network verification
1035+
File: network-verification
1036+
- Name: Configuring a cluster-wide proxy during installation
1037+
File: configuring-cluster-wide-proxy
1038+
- Name: CIDR range definitions
1039+
File: cidr-range-definitions
1040+
- Name: Network security
1041+
Dir: network_security
1042+
Distros: openshift-rosa-hcp
1043+
Topics:
1044+
- Name: Understanding network policy APIs
1045+
File: network-policy-apis
1046+
- Name: Admin network policy
1047+
Dir: AdminNetworkPolicy
1048+
Distros: openshift-rosa-hcp
1049+
Topics:
1050+
- Name: About AdminNetworkPolicy
1051+
File: ovn-k-anp
1052+
- Name: About BaselineAdminNetworkPolicy
1053+
File: ovn-k-banp
1054+
- Name: Network policy
1055+
Dir: network_policy
1056+
Distros: openshift-rosa-hcp
1057+
Topics:
1058+
- Name: About network policy
1059+
File: about-network-policy
1060+
- Name: Creating a network policy
1061+
File: creating-network-policy
1062+
- Name: Viewing a network policy
1063+
File: viewing-network-policy
1064+
- Name: Editing a network policy
1065+
File: editing-network-policy
1066+
- Name: Deleting a network policy
1067+
File: deleting-network-policy
1068+
- Name: Defining a default network policy for projects
1069+
File: default-network-policy
1070+
- Name: Configuring multitenant isolation with network policy
1071+
File: multitenant-network-policy
1072+
# Included for OSDOCS-13465
1073+
- Name: Audit logging for network security
1074+
File: logging-network-security
1075+
- Name: Configuring the primary cluster network
1076+
Dir: ovn_kubernetes_network_provider
1077+
Distros: openshift-rosa-hcp
1078+
Topics:
1079+
- Name: About the OVN-Kubernetes network plugin
1080+
File: about-ovn-kubernetes
1081+
- Name: Configuring an egress IP address
1082+
File: configuring-egress-ips-ovn
1083+
# OpenShift SDN not supported for HCP
1084+
- Name: Configuring Routes
1085+
Dir: routes
1086+
Distros: openshift-rosa-hcp
1087+
Topics:
1088+
- Name: Route configuration
1089+
File: route-configuration
1090+
- Name: Secured routes
1091+
File: secured-routes
1092+
---
10151093
Name: Nodes
10161094
Dir: nodes
10171095
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
+

modules/albo-installation.adoc

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $ oc new-project aws-load-balancer-operator
2121
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.
2222
====
2323
+
24+
// 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
2425
[source,terminal]
2526
----
2627
$ POLICY_ARN=$(aws iam list-policies --query \
@@ -36,7 +37,7 @@ $ if [[ -z "${POLICY_ARN}" ]]; then
3637
fi
3738
$ echo $POLICY_ARN
3839
----
39-
+
40+
4041
. Create an AWS IAM trust policy for AWS Load Balancer Operator:
4142
+
4243
[source,terminal]
@@ -61,20 +62,20 @@ $ cat <<EOF > "${SCRATCH}/trust-policy.json"
6162
}
6263
EOF
6364
----
64-
+
65+
6566
. Create an AWS IAM role for the AWS Load Balancer Operator:
6667
+
6768
[source,terminal]
6869
----
69-
$ ROLE_ARN=$(aws iam create-role --role-name "${ROSA_CLUSTER_NAME}-alb-operator" \
70+
$ ROLE_ARN=$(aws iam create-role --role-name "${CLUSTER_NAME}-alb-operator" \
7071
--assume-role-policy-document "file://${SCRATCH}/trust-policy.json" \
7172
--query Role.Arn --output text)
7273
$ echo $ROLE_ARN
7374

74-
$ aws iam attach-role-policy --role-name "${ROSA_CLUSTER_NAME}-alb-operator" \
75+
$ aws iam attach-role-policy --role-name "${CLUSTER_NAME}-alb-operator" \
7576
--policy-arn $POLICY_ARN
7677
----
77-
+
78+
7879
. Create a secret for the AWS Load Balancer Operator to assume our newly created AWS IAM role:
7980
+
8081
[source,terminal]
@@ -92,7 +93,7 @@ stringData:
9293
web_identity_token_file = /var/run/secrets/openshift/serviceaccount/token
9394
EOF
9495
----
95-
+
96+
9697
. Install the AWS Load Balancer Operator:
9798
+
9899
[source,terminal]
@@ -120,7 +121,7 @@ spec:
120121
startingCSV: aws-load-balancer-operator.v1.0.0
121122
EOF
122123
----
123-
+
124+
124125
. Deploy an instance of the AWS Load Balancer Controller using the Operator:
125126
+
126127
[NOTE]
@@ -140,16 +141,17 @@ spec:
140141
name: aws-load-balancer-operator
141142
EOF
142143
----
143-
+
144+
144145
. Check the that the Operator and controller pods are both running:
145146
+
146147
[source,terminal]
147148
----
148149
$ oc -n aws-load-balancer-operator get pods
149150
----
150151
+
151-
You should see the following, if not wait a moment and retry:
152+
If you do not see output similar to the following, wait a few moments and retry.
152153
+
154+
.Example output
153155
[source,terminal]
154156
----
155157
NAME READY STATUS RESTARTS AGE
@@ -166,14 +168,15 @@ aws-load-balancer-operator-controller-manager-577d9ffcb9-w6zqn 2/2 Running
166168
----
167169
$ oc new-project hello-world
168170
----
169-
+
171+
170172
. Deploy a hello world application:
171173
+
172174
[source,terminal]
173175
----
174176
$ oc new-app -n hello-world --image=docker.io/openshift/hello-openshift
175177
----
176-
+
178+
// TODO OSDOCS-11830 At this point "oc status" shows me a URL that I can curl to get "Hello OpenShift!"
179+
177180
. Configure a NodePort service for the AWS ALB to connect to:
178181
+
179182
[source,terminal]
@@ -194,7 +197,7 @@ spec:
194197
deployment: hello-openshift
195198
EOF
196199
----
197-
+
200+
198201
. Deploy an AWS ALB using the AWS Load Balancer Operator:
199202
+
200203
[source,terminal]
@@ -221,7 +224,8 @@ spec:
221224
number: 80
222225
EOF
223226
----
224-
+
227+
228+
// TODO OSDOCS_11830 At this point I can see the ingress has been created but there is no LB in the status block, just an empty loadBalancer array - nothing after this point works as indicated for HCP
225229
. Curl the AWS ALB Ingress endpoint to verify the hello world application is accessible:
226230
+
227231
[NOTE]

modules/aws-installing-an-aws-load-balancer-operator.adoc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ You can install an AWS Load Balancer Operator and an AWS Load Balancer Controlle
1515
* You have access to modify the VPC and subnets of the created ROSA cluster.
1616
* You have installed the ROSA CLI (`rosa`).
1717
* You have installed the Amazon Web Services (AWS) CLI.
18+
ifndef::openshift-rosa-hcp[]
1819
* You are using {product-title} 4.13 or later.
20+
endif::openshift-rosa-hcp[]
1921
2022
[IMPORTANT]
2123
====
@@ -55,7 +57,7 @@ or
5557
$ oc get authentication.config cluster -o=jsonpath="{.spec.serviceAccountIssuer}"
5658
----
5759
+
58-
.. Locate the OIDC Amazon Resource Name (ARN) information on the AWS Web Console by navigating to *IAM* *Access management* *Identity providers*. An OIDC ARN example is `arn:aws:iam::777777777777:oidc-provider/<oidc_dns_url>`.
60+
.. Locate the OIDC Amazon Resource Name (ARN) information on the AWS Web Console by navigating to *IAM* *Access management* *Identity providers*. An OIDC ARN example is `arn:aws:iam::777777777777:oidc-provider/<oidc_dns_url>`.
5961
+
6062
.. Save the output from the commands. You will use this information in future steps within this procedure.
6163

@@ -81,7 +83,7 @@ $ IDP_ARN="arn:aws:iam::{AWS_AccountNo}:oidc-provider/${IDP}" <1>
8183
----
8284
<1> Replace `{AWS_AccountNo}` with your AWS account number and `{Cluster_OIDC_Endpoint}` with the OIDC DNS identified earlier in this procedure.
8385
+
84-
.. Verify that the trsut policy was assigned to the AWS IAM role.
86+
.. Verify that the trust policy was assigned to the AWS IAM role.
8587
+
8688
.Example output
8789
[source,terminal,subs="quotes,verbatim"]
@@ -159,7 +161,15 @@ $ aws iam put-role-policy --role-name albo-operator --policy-name perms-policy-a
159161
[source,terminal]
160162
----
161163
$ IDP='{Cluster_OIDC_Endpoint}'
164+
----
165+
+
166+
[source,terminal]
167+
----
162168
$ IDP_ARN="arn:aws:iam::{AWS_AccountNo}:oidc-provider/${IDP}"
169+
----
170+
+
171+
[source,terminal]
172+
----
163173
$ cat <<EOF > albo-controller-trusted-policy.json
164174
{
165175
"Version": "2012-10-17",
@@ -236,6 +246,7 @@ Internet-facing and internal load balancers will be created within the AWS Avail
236246
====
237247
ELBv2 resources (such as ALBs and NLBs) created by AWS Load Balancer Operator do not inherit custom tags set for ROSA clusters. You must set tags separately for these resources.
238248
====
249+
// TODO OSDOCS-11830: Is the above still true?
239250
240251
. Create the AWS Load Balancer Operator by completing the following steps:
241252
+

modules/cluster-wide-proxy-preqs.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ifdef::openshift-dedicated[]
2121
* You have an existing Virtual Private Cloud (VPC) for your cluster.
2222
* You are using the Customer Cloud Subscription (CCS) model for your cluster.
2323
endif::openshift-dedicated[]
24-
* The proxy can access the VPC for the cluster and the private subnets of the VPC. The proxy is also accessible from the VPC for the cluster and from the private subnets of the VPC.
24+
* The proxy can access the VPC for the cluster and the private subnets of the VPC. The proxy must also be accessible from the VPC for the cluster and from the private subnets of the VPC.
2525
* You have added the following endpoints to your VPC endpoint:
2626
** `ec2.<aws_region>.amazonaws.com`
2727
** `elasticloadbalancing.<aws_region>.amazonaws.com`
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
:_mod-docs-content-type: PROCEDURE
3+
[id="mos-aws-load-balancer-operator-install_{context}"]
4+
= Installing AWS Load Balancer Operator
5+
6+
// TODO OSDOCS-11830 until this is validated
7+
[WARNING]
8+
====
9+
The instructions in this section have not yet been validated against all supported environments. Do not use these instructions for production environments.
10+
====
11+
12+
//Replaces Creating an IAM role for the ALB Operator and Creating an IAM role for the ALB Controller using the ccoctl tool
13+
14+
15+
16+
17+
// TODO OSDOCS-11830 Create IAM role for ALBO without ccoctl
18+
// Verify tutorial method here: https://docs.redhat.com/en/documentation/red_hat_openshift_service_on_aws/4/html/tutorials/cloud-experts-aws-load-balancer-operator
19+
// Know your variables: rosa cluster name, region, OIDC endpoint, AWS account ID, VPC ID, public subnet ID/s, private subnet ID/s
20+
// Tag VPC with kubernetes.io/cluster/<cluster-id>:owned - is this necessary or just useful?
21+
// Tag private subnets with internal-elb, tag public subnets with elb - these appear to be done automatically when creating a VPC with rosa create network
22+
//Hidden prereq? need to create VPC and cluster across multiple regions
23+
24+
25+
26+
//= Configuring AWS Load Balancer Operator for Managed OpenShift clusters
27+
28+
//. Gather the following information for your cluster:
29+
//** Cluster infrastructure ID
30+
//** OIDC Endpoint URL
31+
//** OIDC Provider ARN
32+
33+
//(The following is what you are doing with ccoctl, without being in your project or logged on to your console)
34+
// remote resources for credential requests:
35+
//Operator: https://raw.githubusercontent.com/openshift/aws-load-balancer-operator/main/hack/controller/controller-credentials-request.yaml
36+
//Controller: https://raw.githubusercontent.com/openshift/aws-load-balancer-operator/main/hack/controller/controller-credentials-request.yaml
37+
38+
//. Create the required IAM policy for the ALB Operator
39+
//.. Log in to the cluster as a user with the dedicated-admin role.
40+
//.. Create a new project named aws-load-balancer-operator (required name or any name?)
41+
//.. Create the trust policy for the ALBO, using the OIDC Endpoint URL and the OIDC Provider ARN for your cluster.
42+
//.. Create a new albo-operator role and assign it the ALBO trust policy.
43+
//.. Attach the https://raw.githubusercontent.com/openshift/aws-load-balancer-operator/release-1.1/hack/operator-permission-policy.json permission policy to the new role
44+
//. Create the required IAM policy for the ALB Controller
45+
//.. (very similar steps to above)
46+
// (The above is all that you are doing with ccoctl, without being in your project or logged on to your openshift console at all?)
47+
48+
//. HCP: Add tags to ensure discovery?
49+
//. Create the OperatorGroup - why
50+
//. Create the Subscription - why
51+
//. Create the ALB Controller - why
52+
53+
// Installing file networking/networking_operators/modules/aws-installing-an-aws-load-balancer-operator.adoc covers:
54+
// Create a new project for the operator
55+
// Create the trust policy for the operator
56+
// Create a role using the trust policy for the operator
57+
// Assign the policy to the operator role?
58+
// Create a trust policy for the controller
59+
// Create a role based on the controller trust policy
60+
// Assign the policy to the controller role?

modules/rosa-create-objects.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ $ rosa create network [flags]
889889
|Option |Definition
890890

891891
|<template-name>
892-
|Allows you to use a custom template. Templates must be in the template folder, structured as `templates/<template-name>/cloudformation.yaml`. If no template name is provided, the command uses the default template. For binary builds, this template directory must be referenced manually after it is downloaded.
892+
|Allows you to use a custom template. Templates must be in the template folder, structured as `templates/<templat// TODO This section could be more useful about the parametere-name>/cloudformation.yaml`. If no template name is provided, the command uses the default template. For binary builds, this template directory must be referenced manually after it is downloaded.
893893

894894
|===
895895

@@ -915,6 +915,7 @@ include::https://raw.githubusercontent.com/openshift/rosa/refs/heads/master/cmd/
915915

916916
|--param <various>
917917
|Available parameters depend on the template. Use `--help` when in the template directory to find available parameters.
918+
// TODO OSDOCS-11830 Suggest adding more parameters here, at least some related to setting up multiple AZs
918919

919920
|--mode=manual
920921
|Provides AWS commands to create the network stack.

0 commit comments

Comments
 (0)