-
Notifications
You must be signed in to change notification settings - Fork 583
Allow fully-populated loadblancer creation without default pool / l7policies / l7rules #2086
Copy link
Copy link
Closed
Description
I found out that the go struct tags "xor" in createOpts causes issues if one tries to create fully-populated-loadbalancer without default pool, without l7policies or with l7policies but without l7rules:
e.g. if using following marshalled createOpts
{
"name": "kube_service_kubernetes_default_my-nginx",
"description": "Kubernetes external service default/my-nginx from cluster kubernetes",
"vip_subnet_id": "58b372be-bdc6-4ac0-a58e-751997a647db",
"provider": "f5",
"listeners": [
{
"protocol": "TCP",
"protocol_port": 80,
"name": "listener_tcp_80_kube_service_kubernetes_default_my-nginx",
"default_pool": {
"lb_algorithm": "ROUND_ROBIN",
"protocol": "TCP",
"name": "pool_tcp_80_kube_service_kubernetes_default_my-nginx",
"members": [
{
"address": "10.240.0.20",
"protocol_port": 30474,
"name": "worker-0",
"subnet_id": "58b372be-bdc6-4ac0-a58e-751997a647db"
}
]
},
"connection_limit": -1,
"timeout_client_data": 50000,
"timeout_member_data": 50000,
"timeout_member_connect": 5000,
"timeout_tcp_inspect": 0
}
]
}Error thrown by opts.ToLoadBalancerCreateMap:
Exactly one of DefaultPool and LoadbalancerID must be provided
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels