-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[feat aga] Implement AGA endpoint resource references loading and monitoring #4458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: AGAController
Are you sure you want to change the base?
[feat aga] Implement AGA endpoint resource references loading and monitoring #4458
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: shraddhabang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
54f87b6 to
9e99f31
Compare
| ) | ||
|
|
||
| // DNSResolver resolves load balancer DNS names to ARNs | ||
| type DNSResolver struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we call this DNSToArnResolver or DNSToLoadBalancerResolver? "DNS Resolver" makes me think we're mapping a DNS name to IP addresses, which is not what we're doing here.
|
|
||
| // AddConsumer adds a consumer (GlobalAccelerator) to the watcher | ||
| func (w *ResourceWatcher) AddConsumer(consumerID string) { | ||
| w.consumers.Insert(consumerID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking we should add mutex to protect consumers from concurrent access
This PR implements two key components for the AWS Global Accelerator controller:
Commit 1: [feat aga] Implement endpoint loader with DNS resolution
This commit implements the endpoint loading system for the AGA controller. It provides:
The endpoint loader enables GlobalAccelerator resources to reference Kubernetes objects and automatically resolve them to the appropriate AWS resources.
Commit 2: [feat aga] Implement resource monitoring for referenced resources
This commit implements the resource monitoring system for the AGA controller. It provides:
This monitoring system ensures that when a referenced resource changes (e.g., a Service gets a new load balancer), the GlobalAccelerator is automatically reconciled to use the updated endpoint.
Note for temporary limitations for cross namespace reference
We want to allow references to Kubernetes resources (Services, Ingresses, Gateways) that exist in different namespaces from the GlobalAccelerator CR itself. This enables more flexible architectural patterns but requires careful security considerations. We will implement this later as we will need to come up with a proper cross-namespace reference system keeping security concerns in mind. For now in the current implementation cross-namespace references are detected but only result in a warning - this means:
Checklist
README.md, or thedocsdirectory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯