Vald Discoverer

Vald Discoverer runs individually and helps automate operations for the Vald cluster.

It is also the only component that communicates with kube-apiserver.


Vald Discoverer is responsible for retrieving each Node and Pod resource usage from kube-apiserver and sharing it with other components in the Vald cluster.


Getting Node and Pod metrics

Vald Discoverer requires kube-apiserver to get Node and Pod metrics in the Vald cluster.

It synchronizes the metrics when it changes by the Reconcile function, one of the internal functions.

The kind of metrics are here:

  • Node

    Key nameDescription
    Namenode name
    InternalAddrnode internal address
    ExternalAddrnode external address
    CPUCPU limit and CPU request
    MemoryMemory limit and Memory request
    PodsPod information in the node
  • Pod

    Key nameDescription
    AppNameAppName of pod
    Namepod name
    Namespacenamespace where pod runs
    IPIP address
    CPUCPU limit and CPU request
    MemoryMemory limit and Memory request

When syncing success, Vald Discoverer chooses the necessary metrics from the result and stores them into their four kinds of Map on their local memory:

Map nameDescription
podsByNodepod metrics list group by node
podsByNamespacepod metrics list group by namespace
podsByNamepod metrics list group by pod name
nodebyNamenode metrics list group by node name

Sharing Node and Pod metrics

Vald Discoverer provides the internal client for another component.

The component, which requires the metrics information, uses when it needs.

Vald LB Gateway and Vald Manager Index in the Vald cluster require it to achieve its responsibility.

For example, Vald LB Gateway creates the new discoverer client with config parameters and binds it to the new gateway lb client when Vald LB Gateway starts the container.

When the initContainer successes, Vald LB Gateway can get the metrics asynchronously according to its set parameters.

Cluster role configurations

Please refer here for more information about the cluster role configuration.

See also