gardener / machine-controller-manager-provider-openstack

Out of tree implementation for machine-controller-manager's provider-openstack
Apache License 2.0
4 stars 25 forks source link

OpenStack: prefer server tags instead of metadata #79

Open kayrus opened 4 years ago

kayrus commented 4 years ago

At the moment Gardener nodes are detected by listing all the servers in the project, then the servers list is filtered at the MCM side: https://github.com/gardener/machine-controller-manager/blob/86b72854549fa6cbe6c6a8c1c5ec727f164f07f3/pkg/driver/driver_openstack.go#L286

OpenStack Nova supports tags, and tags can be used to efficiently filter compute nodes, see https://github.com/gophercloud/gophercloud/blob/193120096e295dd6fe47e5e047e5fe1a5b231e54/openstack/compute/v2/servers/requests.go#L59..L74

Filtering by tags is more efficient and it can reduce the load on the nova API side.

cc @hardikdr @prashanth26

himanshu-kun commented 1 year ago

@kon-angelo is this issue still relevant?

kon-angelo commented 1 year ago

@himanshu-kun it is a bit of a complex topic because now that the worker labels are passed on as server metadata but it is a valid improvement at least for the tags that the MCM provider cares and filters