From 4b0412965c040b4e4166c589f5942f4c4c00d77f Mon Sep 17 00:00:00 2001 From: enxebre Date: Mon, 17 Oct 2022 12:44:38 +0200 Subject: [PATCH] Add comments to clarify aws endpoints controllers --- .../controllers/awsprivatelink/awsprivatelink_controller.go | 4 ++++ hypershift-operator/controllers/platform/aws/controller.go | 3 +++ 2 files changed, 7 insertions(+) diff --git a/control-plane-operator/controllers/awsprivatelink/awsprivatelink_controller.go b/control-plane-operator/controllers/awsprivatelink/awsprivatelink_controller.go index 43fe29244d..c201f81fc7 100644 --- a/control-plane-operator/controllers/awsprivatelink/awsprivatelink_controller.go +++ b/control-plane-operator/controllers/awsprivatelink/awsprivatelink_controller.go @@ -46,6 +46,8 @@ const ( defaultResync = 10 * time.Hour ) +// PrivateServiceObserver watches a given Service type LB and reconciles +// an awsEndpointService CR representation for it. type PrivateServiceObserver struct { client.Client @@ -171,6 +173,8 @@ const ( routerDomain = "apps" ) +// AWSEndpointServiceReconciler watches AWSEndpointService resources and reconciles +// the existence of AWS Endpoints for it in the guest cluster infrastructure. type AWSEndpointServiceReconciler struct { client.Client ec2Client ec2iface.EC2API diff --git a/hypershift-operator/controllers/platform/aws/controller.go b/hypershift-operator/controllers/platform/aws/controller.go index b27f9a4b4a..ac056af420 100644 --- a/hypershift-operator/controllers/platform/aws/controller.go +++ b/hypershift-operator/controllers/platform/aws/controller.go @@ -46,6 +46,9 @@ const ( lbNotActiveRequeueDuration = 20 * time.Second ) +// AWSEndpointServiceReconciler watches HC/NodePools/awsEndpointService and reconcile the awsEndpointService +// CRs existing for the KubeAPIServerPrivateService and the PrivateRouterService. +// It creates the endpoint service in AWS and keeps the SubnetIDs up to date so NodePools are able to attach to the service endpoint. type AWSEndpointServiceReconciler struct { client.Client upsert.CreateOrUpdateProvider