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

Expose bind9 endpoints #253

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

omersch381
Copy link
Contributor

This patch creates series of services and map them to the statefulset members using the podname.

Each service has an IP from a metallb pool.

Copy link
Contributor

openshift-ci bot commented Nov 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: omersch381

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@omersch381
Copy link
Contributor Author

omersch381 commented Nov 22, 2024

note: it looks like the services are created with a metalLB ip, but I am not sure if we want an endpoint as well
~ > oc get svc | grep designate
designate-backendbind9-designate-backendbind9-0 LoadBalancer 10.217.4.244 172.17.0.81 53:32663/UDP,53:32663/TCP 33m
designate-backendbind9-designate-backendbind9-1 LoadBalancer 10.217.5.180 172.17.0.82 53:30551/UDP,53:30551/TCP 33m
designate-internal LoadBalancer 10.217.4.178 172.17.0.80 9001:31218/TCP 33m
designate-public ClusterIP 10.217.4.100 9001/TCP 33m
designate-unbound ClusterIP 10.217.4.212 53/TCP 33m

~ > oc get endpoints | grep designate
designate-backendbind9-0 <none> 33m
designate-backendbind9-1 <none> 33m
designate-internal 10.217.0.201:9001 33m
designate-public 10.217.0.201:9001 33m
designate-unbound 10.217.0.194:53 33m

Copy link
Collaborator

@beagles beagles left a comment

Choose a reason for hiding this comment

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

I think there's a couple of things we need to sort out with names, but this looks like an excellent start.

Namespace: m.Namespace,
Labels: labels,
Annotations: map[string]string{
"metallb.universe.tf/address-pool": "internalapi",
Copy link
Collaborator

Choose a reason for hiding this comment

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

The address pool will need to be configurable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, I will upload another version.

services := make([]*corev1.Service, replicas)

for i := int32(0); i < replicas; i++ {
podName := fmt.Sprintf("%s-%d", m.Name, i)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This might not be correct for a mapping. We'll need to figure that out.

@omersch381
Copy link
Contributor Author

/retest

@omersch381 omersch381 requested a review from beagles December 4, 2024 09:48
@@ -78,6 +78,11 @@ type DesignateBackendbind9SpecBase struct {
// +kubebuilder:validation:Optional
// StorageRequest
StorageRequest string `json:"storageRequest"`

// +kubebuilder:default="internalapi"
Copy link
Collaborator

@beagles beagles Dec 6, 2024

Choose a reason for hiding this comment

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

In retrospect, I don't think this is a good default. It may not be possible to to have a default really. What are your thoughts on leaving it empty and only creating the services if a pool is provided? For testing we might want to try using the ctlplane address pool and see if we can reach the binds that way.

This patch creates series of services and map them to the statefulset
members using the podname.

Each service has an IP from a metallb pool.
@omersch381 omersch381 force-pushed the add_service_per_bind branch from 34fa11f to 239491c Compare January 13, 2025 14:40
Copy link
Contributor

openshift-ci bot commented Jan 13, 2025

@omersch381: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/designate-operator-build-deploy-kuttl 239491c link true /test designate-operator-build-deploy-kuttl

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants