ytsaurus-ui icon indicating copy to clipboard operation
ytsaurus-ui copied to clipboard

Configurable sources for host/container selectors

Open zlobober opened this issue 1 year ago • 1 comments

There is a selector container/host at the System page. image

Currently its logic is as follows:

  • Container: show instance name as it is shown in Cypress (i.e. //sys/scheduler/instances/<instance_name>)
  • Host: show physical_host annotation of the instance node in Cypress (i.e. //sys/scheduler/instances/<instance_name>/@annotations/physical_host)

In k8s (at least in Nebius convention) the logic must be different:

  • Container: show k8s_pod_name annotation of the instance node in Cypress (i.e. //sys/scheduler/instances/<instance_name>/@annotations/k8s_pod_name)
  • Host: show instance name as it is shown in Cypress (i.e. //sys/scheduler/instances/<instance_name>)

I believe that there may be other situations when some of these selectors must be handled differently (i.e. in case of installations without k8s outside of Yandex). Therefore, I'd suggest introduce two options allowing customization of the data source for these selectors.

For example, it may look as follows: instance_host_source = "instance_name" | "annotation:<annotation_name>" instance_container_source = "instance_name" | "annotation:<annotation_name>"

For Yandex configuration will be instance_host_source = "annotation:physical_host" and instance_container_source = "instance_name"; for Nebius k8s it will be instance_host_source = "instance_name" and instance_container_source = "annotation:k8s_pod_name".

zlobober avatar Dec 13 '23 07:12 zlobober