Openstack provider clean-up #691
Labels
kind/cleanup
Categorizes issue or PR as related to cleaning up code, process, or technical debt.
priority/low
Not that important.
sig/cluster-management
Denotes a PR or issue as being assigned to SIG Cluster Management.
This issue is to do some clean-up in the openstack provider logic, that in some cases is not very clear or optimal. A few examples:
In order to get a network by name or ID we iterate through all networks instead of getting it directly with the proper API call:
https://github.com/kubermatic/machine-controller/blob/master/pkg/cloudprovider/provider/openstack/helper.go#L217
Same applies for security groups:
https://github.com/kubermatic/machine-controller/blob/master/pkg/cloudprovider/provider/openstack/helper.go#L184
The logic we use to get the default subset is a bit obscure: if we have just one subnet in the network provided in input we return it otherwise we obtain the subnets from the API and we return the first if any or we throw an error. If there is a reason behind that, I have some doubts, we should at least comment it properly.
https://github.com/kubermatic/machine-controller/blob/master/pkg/cloudprovider/provider/openstack/helper.go#L416
The text was updated successfully, but these errors were encountered: