Skip to main content
Version: Next 🚧

Resources Stack

The Resources Stack is the core data pipeline in the Krateo Composable Portal (KCP) responsible for discovering, storing, and serving Kubernetes resource information.

It consists of two main components working in tandem with a PostgreSQL database:

  1. Resources Ingester: The "Collector" that receives resource updates.
  2. Resources Presenter: The "Server" that provides the API for the frontend.

Data Flow​

Resources Stack Flow

1. Resources Ingester​

The Ingester acts as a high-performance gateway for resource metadata. It receives resource state changes from the cluster, batches them, and stores them in partitioned PostgreSQL tables. Its primary goal is to maintain an up-to-date mirror of the cluster state in the database.

2. PostgreSQL (Data Store)​

The database stores resource metadata using daily partitions managed by Deviser. This ensures that querying historical or large-scale resource data remains performant.

3. Resources Presenter​

The Presenter exposes the data stored in PostgreSQL through a unified REST API. It handles complex filtering and, most importantly, RBAC enforcement. It ensures that users only see resources they are authorized to access in the real Kubernetes cluster.


Technical Reference​

Environment Variables​

Resources Ingester​

NameDescriptionDefault
PORTHealth probe server port8080
DB_HOSTDatabase host-
DB_PORTDatabase port5432
DB_NAMEDatabase name-
DB_USERDatabase username-
DB_PASSDatabase password-
DB_PARAMSExtra connection parameters (e.g., sslmode=disable)-
DB_READY_TIMEOUTMax wait for PostgreSQL readiness2m
NAMESPACESComma-separated list of namespaces to watchall (if empty)

Resources Presenter​

NameDescriptionDefault
PORTHTTP server port8080
DEBUGEnable debug-level loggingfalse
DB_HOSTDatabase hostlocalhost
DB_PORTDatabase port5432
DB_NAMEDatabase name-
DB_USERDatabase username-
DB_PASSDatabase password-
DB_PARAMSExtra connection parameters (e.g., sslmode=disable)-
DB_READY_TIMEOUTMax wait for PostgreSQL readiness5m

Documentation​

ComponentPurpose
API ReferenceREST API endpoints for the Presenter.
Ingester TelemetryMetrics for data collection and DB insertion.
Presenter TelemetryMetrics for API performance and RBAC filtering.