You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Etcd scale sub-resource should also define labelSelectorPath, to allow for selection of pods managed by the Etcd resource, such that autoscalers like HPA and VPA can directly work with Etcd resources.
Why is this needed:
With #777, scale sub-resource was re-introduced for the Etcd resource. But this only includes specReplicasPath and statusReplicasPath, but not labelSelectorPath. The reason for this was that the field that labelSelectorPath points to must have a serialised key-value string for the matching labels, and a complex LabelSelector struct/map will not work. While Etcd resource does have a status.labelSelector field, this is also a LabelSelector object, and not a serialised string of key-value pairs of matching labels, so it would not work for the scale sub-resource. The same holds true for spec.selector as well. Additionally, the spec may not always represent the current state of the etcd cluster, so any changes to the label selector in the spec that have not yet been reconciled by druid, would lead to errors when selecting pods matching the new label selector.
Finally, not defining the labelSelectorPath means that while we can now scale the etcd replicas using the scale sub-resource, via kubectl scale command, we still don't provide support for autoscalers like HPA and VPA to operate on the Etcd resource directly, since these require the labelSelectorPath to be defined for the scale sub-resource, in order to select the pods managed by the Etcd, and gather metrics for those pods and take horizontal/vertical scaling decisions based on those metrics.
The text was updated successfully, but these errors were encountered:
How to categorize this issue?
/area usability
/kind enhancement
What would you like to be added:
Etcd scale sub-resource should also define
labelSelectorPath
, to allow for selection of pods managed by the Etcd resource, such that autoscalers like HPA and VPA can directly work withEtcd
resources.Why is this needed:
With #777, scale sub-resource was re-introduced for the
Etcd
resource. But this only includesspecReplicasPath
andstatusReplicasPath
, but notlabelSelectorPath
. The reason for this was that the field thatlabelSelectorPath
points to must have a serialised key-value string for the matching labels, and a complexLabelSelector
struct/map will not work. WhileEtcd
resource does have astatus.labelSelector
field, this is also aLabelSelector
object, and not a serialised string of key-value pairs of matching labels, so it would not work for the scale sub-resource. The same holds true forspec.selector
as well. Additionally, the spec may not always represent the current state of the etcd cluster, so any changes to the label selector in the spec that have not yet been reconciled by druid, would lead to errors when selecting pods matching the new label selector.Finally, not defining the
labelSelectorPath
means that while we can now scale the etcd replicas using the scale sub-resource, viakubectl scale
command, we still don't provide support for autoscalers like HPA and VPA to operate on theEtcd
resource directly, since these require thelabelSelectorPath
to be defined for the scale sub-resource, in order to select the pods managed by theEtcd
, and gather metrics for those pods and take horizontal/vertical scaling decisions based on those metrics.The text was updated successfully, but these errors were encountered: