k8s-cluster-api-provider
k8s-cluster-api-provider copied to clipboard
Testcluster: CAPO Load Balancer Provider defaults to Amphora
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"
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: ovnto thecluster-template.yamlhelped to create the load balancer for the testcluster via ovn
Yes, this is also true. See also https://github.com/SovereignCloudStack/k8s-cluster-api-provider/issues/706#issuecomment-1996746037
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.
This issue was closed because it has been stalled for 60 days with no activity.