pub trait ClusterReader: Send + Sync {
// Required methods
fn lookup_one(
&self,
api_version: &str,
kind: &str,
namespace: &str,
name: &str,
) -> Option<JsonValue>;
fn lookup_list(
&self,
api_version: &str,
kind: &str,
namespace: &str,
) -> Vec<JsonValue>;
}Expand description
Reads existing cluster resources at template-render time.
Implementations MUST be non-fatal: any error (network, RBAC, missing
resource, unknown kind) MUST resolve to None / empty list.
Implementations are responsible for any sync/async bridging (e.g.
tokio::task::block_in_place) — the trait is intentionally sync to
match MiniJinja’s function signature requirements.