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

Testcluster: CAPO Load Balancer Provider defaults to Amphora #721

Closed
sbrgr opened this issue Mar 18, 2024 · 3 comments
Closed

Testcluster: CAPO Load Balancer Provider defaults to Amphora #721

sbrgr opened this issue Mar 18, 2024 · 3 comments
Labels

Comments

@sbrgr
Copy link

sbrgr commented Mar 18, 2024

It seems that the creation of the load balancers using CAPO would default to the amphora provider when deploying the testcluster.

I tried to setup the testcluster with ovn as load balancer provider with use_ovn_lb_provider = "true" and got the following error message from the capo-controller-manager pod:

I0308 11:17:59.066472       1 recorder.go:104] "events: Failed to create load balancer k8s-clusterapi-cluster-testcluster-testcluster-kubeapi: Bad request with: [POST http://<my-ip>:9876/v2.0/lbaas/loadbalancers], error message: 
{
	"faultcode": "Client",
	"faultstring": "Provider 'amphora' is not enabled.",
	"debuginfo": null
}" 
type="Warning" 
object=
{
	"kind": "OpenStackCluster",
	"namespace": "testcluster",
	"name": "testcluster-n4bmp",
	"uid": "c406906f-48f8-4169-bf3e-66bd579d02f0",
	"apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha7",
	"resourceVersion": "1720"
}
reason="Failedcreateloadbalancer"

A look into the CAPO repo main.go indicates that the value of the provider: key in the OpenStackClusterTemplate apiServerLoadBalancer block has to be explicitly set to use ovn as LB-provider:

...
fs.StringVar(&lbProvider, "lb-provider", "amphora",
		"The name of the load balancer provider (amphora or ovn) to use (defaults to amphora).")
...

Adding provider: ovn to the cluster-template.yaml helped to create the load balancer for the testcluster via ovn:

---
# apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
kind: OpenStackClusterTemplate
metadata:
  name: ${CLUSTER_NAME}-${OPENSTACK_CLUSTER_GEN}
spec:
template:
  spec:
  ...
  apiServerLoadBalancer:
    enabled: true
    provider: ovn
  ...
---

Environment:
commit: 9c1f526f29c885ed88c04ae78f5765ddbd5ca1fa

clusterapi_version = "1.6.1"
capi_openstack_version = "0.9.0"
use_ovn_lb_provider = "true"

@chess-knight
Copy link
Member

It seems that the creation of the load balancers using CAPO would default to the amphora provider when deploying the testcluster.

Yes, that's true.

I tried to setup the testcluster with ovn as load balancer provider with use_ovn_lb_provider = "true" and got the following error message from the capo-controller-manager pod

use_ovn_lb_provider only affects loadbalancer in front of ingress-nginx, see docs.

Adding provider: ovn to the cluster-template.yaml helped to create the load balancer for the testcluster via ovn

Yes, this is also true. See also #706 (comment)

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment, or this will be closed in 60 days.

@github-actions github-actions bot added the stale label Apr 18, 2024
Copy link

This issue was closed because it has been stalled for 60 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
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