Don't apply spec.api defaults on OS

Openstack can use floating IPs as master API address. Setting these defauls and using floating ips ends up in a nil pointer error somewhere in the lbaasv2 code
This commit is contained in:
Ole Markus With 2020-07-12 14:39:25 +02:00
parent 33722a9eca
commit 9b0d235554
1 changed files with 20 additions and 17 deletions

View File

@ -46,6 +46,7 @@ func SetDefaults_ClusterSpec(obj *ClusterSpec) {
obj.Topology.DNS.Type = DNSTypePublic
}
if obj.CloudProvider != "openstack" {
if obj.API == nil {
obj.API = &AccessSpec{}
}
@ -67,6 +68,8 @@ func SetDefaults_ClusterSpec(obj *ClusterSpec) {
obj.API.LoadBalancer.Type = LoadBalancerTypePublic
}
}
if obj.Authorization == nil {
obj.Authorization = &AuthorizationSpec{}
}