kinvolk / lokomotive

🪦 DISCONTINUED Further Lokomotive development has been discontinued. Lokomotive is a 100% open-source, easy to use and secure Kubernetes distribution from the volks at Kinvolk
https://kinvolk.io/lokomotive-kubernetes/
Apache License 2.0
321 stars 49 forks source link

Provide consistent NodeAffinity or NodeSelector UX for components #435

Open surajssd opened 4 years ago

surajssd commented 4 years ago

Problem

Right now some components support node_selector and others support node_affinity. It is very incosistent.

Historically this has been the case because Lokoctl exposed whatever underlying Helm Chart is exposing. Lokoctl never did any magical tranformation from node_affinity (at lokoctl) to node_selector (at the chart values level).

Also converting from node_affinity to node_selector is a lossy change because node_affinity has so much information that cannot be converted to node_selector. But reverse is not true. We can very easily convert from node_selector to node_affinity, though.

Proposed solution

We expose only node_selector to lokoctl user and depending on what is needed by the chart we do the conversion or just use it as it is.

invidian commented 4 years ago

We expose only node_selector to lokoctl user and depending on what is needed by the chart we do the conversion or just use it as it is.

According to the documentation, node affinity is an expansion of node selector, so shouldn't we support node_affinity instead of node_selector?

johananl commented 4 years ago

Yes, I think we can drop node selector support. Whatever we do, it should be consistent across components.