Skip to content
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

Add flag to support ClusterIP exposed CoreDNS #1788

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

bewing
Copy link
Contributor

@bewing bewing commented Dec 10, 2024

Some environments (Calico bare-metal, etc) may allow direct client reachability to the Service CIDR, bypassing the need to assign and use LoadBalancerIPs. A new config flag and environment variable allows selection/return of the ClusterIPs in the assistant rather than externally assigned LoadBalancer IPs.

Some environments (Calico bare-metal, etc) may allow direct client
reachability to the Service CIDR, bypassing the need to assign and use
LoadBalancerIPs.  A new config flag and environment variable allows
selection/return of the ClusterIPs in the assistant rather than
externally assigned LoadBalancer IPs.

Signed-off-by: Brandon Ewing <brandon.ewing@imc.com>
Copy link
Collaborator

@abaguas abaguas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simplify the configuration to the users by not adding a new flag. Setting the CoreDNSExposed flag to true is enough.
A service only has one type so we dynamically check if the service is of type LoadBalancer or ClusterIP. Then we can extend logic of the CoreDNSExposedIPs function to fetch the IP addresses depending on the type.

controllers/providers/assistant/gslb.go Show resolved Hide resolved
Instead of using a config flag to select ClusterIPs for the CoreDNS
service, inspect the service type to determine which set of IPs to
return.

Signed-off-by: Brandon Ewing <brandon.ewing@imc.com>
@abaguas abaguas merged commit e2e5a9b into k8gb-io:master Dec 19, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants