Skip to content

Introduce the reflector to reduce the k8s API calls #251

@alicefr

Description

@alicefr

Currently, our operator performs several direct calls to the Kubernetes API server to get and list various objects. Each direct call to the API server incurs network latency and consumes resources on the API server and etcd. Additionally, performing frequent reads against the API server risks hitting rate limits (HTTP 429) during heavy workloads.

Replace direct read operations (get and list) with the kube-rs Reflector. By establishing a background Watcher that keeps an in-memory cache of the resources, we can serve read requests locally.

Example of directl calls:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions