Add first draft of prereqs docs - #72
daxelrod-rh wants to merge 1 commit into
Conversation
Document just AWS prerequisites for now. IAM role commands are copied from the README and retain the same naming as listed there. Assume no VPC sharing for now, since I don't think any of us have tested it.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
daxelrod-rh
left a comment
There was a problem hiding this comment.
Beyond the individual items I've flagged below, we also need to figure out:
- Is this the correct format for this documentation in an operator?
- Should we remove the corresponding parts of the README.md to keep one source of truth for things like the IAM role and policies?
|
|
||
| * OpenShift 4.22 or newer | ||
| * either ROSA HCP or self-managed OpenShift | ||
| * the cluster must be an STS cluster |
There was a problem hiding this comment.
I believe this is necessary to use CredentialsRequest. What docs should I link here?
There was a problem hiding this comment.
We can start with the CCO doc explaining the different CCO credentials modes: https://docs.redhat.com/en/documentation/openshift_container_platform/4.22/html/authentication_and_authorization/managing-cloud-provider-credentials#about-cloud-credential-operator
| # On ROSA, use | ||
| #OIDC_PROVIDER=$(rosa describe cluster -c <cluster-name> -o json | jq -r '.aws.sts.oidc_endpoint_url' | sed 's|https://||') | ||
|
|
||
| aws iam create-role --role-name cudn-bgp-operator \ |
There was a problem hiding this comment.
Should probably change to match the name of the operator
| "Action": "sts:AssumeRoleWithWebIdentity", | ||
| "Condition": { | ||
| "StringEquals": { | ||
| "'$OIDC_PROVIDER':sub": "system:serviceaccount:openshift-cudn-bgp-routing:openshift-cudn-bgp-routing-controller-manager" |
There was a problem hiding this comment.
Is this still the correct namespace and service account?
There was a problem hiding this comment.
That is currently the namespace, but we need to change the default. I'll open a JIRA.
| "ec2:DeleteRouteServerPeer", | ||
| "ec2:CreateTags", | ||
| "ec2:DescribeInstances", | ||
| "ec2:ModifyNetworkInterfaceAttribute" |
There was a problem hiding this comment.
This was copied verbatim from the README. However, the original prototype further scoped down this action to only instances tagged as owned by the cluster. Should we do that here?
|
|
||
| The address ranges for routed CUDNs should not overlap with any address ranges of the VPC. | ||
|
|
||
| The VPC, subnets, and cluster must all be in the same AWS account. |
There was a problem hiding this comment.
We need to decide whether we support VPC Sharing. I included this statement to indicate that we do not, because I don't think anyone has tested this with a shared VPC yet.
|
|
||
| ### OpenShift Cluster | ||
|
|
||
| * OpenShift 4.22 or newer |
There was a problem hiding this comment.
We had decided in a meeting to target 4.22 or newer. However, the operator will likely work on 4.21.13 and newer. Older than 4.21.13 has this OVN-K bug ovn-kubernetes/ovn-kubernetes#6063
| 1. [Associate the Route Server](https://docs.aws.amazon.com/vpc/latest/userguide/route-server-tutorial-associate.html) with the cluster's VPC. | ||
| 1. [Create Route Server Endpoints](https://docs.aws.amazon.com/vpc/latest/userguide/route-server-tutorial-create-endpoints.html), two per subnet. These should be in each subnet your worker nodes are in. For a standard highly-available 3-AZ cluster, this means a total of 6 Route Server Endpoints. Note the IP address of each endpoint for when you configure the operator. | ||
|
|
||
| The operator, once configured, will create and manage the set of Route Server Peers |
There was a problem hiding this comment.
Needs a period at the end of the sentence.
That's fun. I didn't intend to indicate approval with my review, in fact, the GitHub interface didn't let me select an approval status, presumably because I am the author. |
| * the cluster must be an STS cluster | ||
| * the OVN-Kubernetes CNI | ||
|
|
||
| ### IAM Role |
There was a problem hiding this comment.
Should we also include ccoctl instructions?
There was a problem hiding this comment.
I vote yes. We can call it an example.
|
/approve cancel |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thanks for starting this -- having the prerequisites written down somewhere other than in people's heads is overdue, and the shape you've picked (cluster, IAM, VPC, route server) is the right one. Everything below comes from the setup I use to stand up a cluster for testing the operator day to day, so take it as one configuration that demonstrably works rather than as the definitive one. Where it differs from what you've written, that's worth talking through rather than assuming either of us has it right. What I runI drive this with
And it deliberately stops there. It never creates route server peers and never touches SourceDestCheck, because those are the operator's own work. That boundary is exactly what this document is trying to describe, so the script is a reasonable cross-check on it: everything the script builds is a prerequisite, and everything it refuses to build isn't. It works. On the cluster I brought up this morning that gives me spec:
platform: AWS
bgp:
localASN: 65001
routerNodeSelector:
bgp_router: "true"
aws:
region: us-east-2
routeServerIDs:
- rs-0c08421914c50de2band it discovers the rest -- all six endpoint addresses, their AZs, and the remote ASN -- then produces three FRRConfigurations, one per zone: with all five conditions True. Where the doc and that estate differI can't see propagation mentioned anywhere. This is the one I'd fix first. It's also the one that caught me out, which is why the script does it on every route table and why its header says:
My reading is that following the doc as written would leave you with every condition True, every BGP session Established and no traffic actually flowing, which is a horrible thing to go looking for. I'd give it a step of its own in the Route Server section, straight after creating the endpoints. I don't think the endpoint IPs are an input. The doc says to note the IP address of each endpoint "for when you configure the operator", but going by what I pass above, I think the IAM section is missing the ServiceAccount annotation. It looks lifted from the README's "AWS authentication (IRSA)" section, which is sensible, but that section has a third step this one doesn't: oc annotate serviceaccount openshift-cudn-bgp-routing-controller-manager \
-n openshift-cudn-bgp-routing eks.amazonaws.com/role-arn=<role-arn>As I understand it the role never gets assumed without that, so I don't think the instructions can work as they stand. There's a visible join in the rendered page too -- "Step 2 --" is still labelled, but step 1 became prose and step 3 disappeared. Related: two copies of the same policies in one repo will drift, and this one has already drifted on arrival. Could we pick one home? Either move the IRSA content here and link to it from the README, or leave it there and link from here. I lean towards here, since this is where people will be pointed. Subnet placement, where I do it differently. The doc says two endpoints per subnet, "in each subnet your worker nodes are in". I place one pair per AZ, in that AZ's private subnet. Same six for a 3-AZ cluster, but the current wording suggests one pair per subnet, and doesn't say private. I couldn't find anything about labelling the worker nodes. The operator creates one route server peer per node matching for n in $(oc get nodes -l node-role.kubernetes.io/worker -o name); do
oc label "$n" bgp_router=true --overwrite
doneUntil that's done there are no peers and no BGP sessions, however correct the rest of the estate is. Two small onesThe permissions policy is spot on, for what it's worth -- it matches the operator's EC2 client interface exactly, all nine actions plus "Persist routes: Disable" is right but it's already the AWS default; I created a route server without passing that option and got And "desgined" -> "designed". Linking the script from the doc would give readers an executable reference alongside the prose, and make it harder for the two to drift. That gets more valuable rather than less over time: the estate it stands up is precisely the estate this document asks a reader to build by hand, so when it moves into this repo and starts backing the prow e2e jobs, it becomes the thing that proves the document right or wrong. Addendum: the other two cloudsSince the doc opens with "follow the set of prerequisites that corresponds to the cloud provider you are using", it's probably worth knowing there are equivalents of that script for GCP and Azure, trying to capture the same thing:
Both have a One thing that won't mirror the AWS section: Azure allows exactly one Route Server per virtual network, and it presents a redundant pair of addresses for the whole vnet rather than a per-zone endpoint. Every node peers with both whichever zone it's in, so the operator emits one peer group instead of one per AZ. The GCP shape is closer to Azure's than to AWS's here. Worth saying that operator support for both is still in flight (#63 and #64), so I wouldn't write either section as settled yet -- but the prerequisite halves are the stable part, and they're unlikely to move much. |
This will probably need some iteration before we are ready to merge it. I'll add a review with items to discuss.
Document just AWS prerequisites for now.