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

[Feature] HaProxy DataPlane API 3 Support #398

Open
CrAazZyMaN21 opened this issue Jan 6, 2025 · 2 comments
Open

[Feature] HaProxy DataPlane API 3 Support #398

CrAazZyMaN21 opened this issue Jan 6, 2025 · 2 comments
Labels

Comments

@CrAazZyMaN21
Copy link

CrAazZyMaN21 commented Jan 6, 2025

Hi,

I would really like to use this Operator with HaProxy DataPlane API 3 but this is currently not possible due an incompatability issue. Currently only HaProxy DataPlane API 2 is supported which is hardcoded in haproxy_controller.go#L102. Furthermore probably HaProxy 3 DataPlane API changed and the code needs to be adapated also.

If testers are needed for these feature I would he happy to help. I would also like to help with the code but I am sadly too inexperieced for this.

transport := httptransport.New(host, "/v2", []string{c.Scheme})

Here is the log of the error I got:

{"code":404,"message":"path /v2/services/haproxy/sites was not found"}
2025-01-06T01:10:11Z ERROR	Reconciler error {"controller": "externalloadbalancer", "controllerGroup": "lb.lbconfig.carlosedp.com", "controllerKind": "ExternalLoadBalancer", "ExternalLoadBalancer": {"name":"elb-haproxy-master-kubeapi","namespace":"elb-operator"}, "namespace": "elb-operator", "name": "elb-haproxy-master-kubeapi", "reconcileID": "efbc4eb5-da30-47a1-8f8f-c0cdb7a62222", "error": "[GET /services/haproxy/sites][404] getSites default &{Code:0xc000e6eb78 Message:0xc00097ae30 Error:map[]}"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler
/Users/cdepaula/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem
/Users/cdepaula/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:263
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2
/Users/cdepaula/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:224

The new HaProxy 3 API URL is http://HOSTNAME/v3/services/haproxy/sites

Thanks for this Operator ❤️

Edit:
I found out that the DataPlane API 2 Binary is still available in the haproxytech/haproxy-alpine image but available under a different path /usr/bin/dataplaneapi-v2. The DataPlane API 3 Binary is used with this path /usr/bin/dataplaneapi

@CrAazZyMaN21 CrAazZyMaN21 changed the title [Feature] HaProxy 3 Support [Feature] HaProxy DataPlane API 3 Support Jan 6, 2025
@carlosedp
Copy link
Owner

Hi, I will take a look if just changing the API path to v3 might work. I won't give you a date since I'm kinda busy at this moment but i will look into it.

@CrAazZyMaN21
Copy link
Author

Hi, thank you for the fast feedback. Since DataPlane API 2 Binary is still inside the haproxy images it is not urgent at all. It was just confusing at first to debug and figure this out.

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

No branches or pull requests

2 participants