Architecture and Concepts
This document explains the foundational concepts behind the Krateo Core Provider. Read this before consulting the how-to guides.
Glossary​
- CRD (Custom Resource Definition): A Kubernetes resource that defines custom objects and their schemas, enabling users to extend the Kubernetes API.
- CompositionDefinition: A declarative Krateo resource that acts as a master blueprint for a deployable service. It consumes a Helm chart and uses it to dynamically generate a versioned CRD.
- Composition: A Custom Resource representing a single live instance of a service defined by a CompositionDefinition.
- CDC (Composition Dynamic Controller): A dedicated controller deployed by the Core Provider for each CompositionDefinition. It manages the full lifecycle of Helm releases based on Composition resources.
- Chart Inspector: A service that introspects Helm chart content to provide the CDC with resource metadata for RBAC generation.
- OCI Registry: A container registry used for storing and distributing Helm charts.
- values.schema.json: A JSON Schema file included in Helm charts to define and validate the structure of
values.yaml.
Architecture​

The Core Provider orchestrates three main actors:
- Core Provider: Watches
CompositionDefinitionresources. For each one, it generates a CRD and deploys a CDC. - CDC (Composition Dynamic Controller): Watches
Compositionresources of a specific version and manages Helm releases. - Chart Inspector: Provides the CDC with the list of resources it manages, enabling precise RBAC generation.
For a detailed look at the security model, see Security Design.
Lifecycle Workflow​

The lifecycle of a Krateo service follows these stages:
- Registration: A
CompositionDefinitionis applied to the cluster. - Generation: The Core Provider generates the CRD and spawns the CDC.
- Instantiation: A user creates a
Compositionresource. - Enforcement: The CDC installs the Helm chart and continuously reconciles the state.
- Evolution: The service is upgraded following one of the Version Management patterns.
Chart Requirements​
To be compatible with Krateo, a Helm chart must include a values.schema.json file. This file is used to:
- Generate the OpenAPI schema for the
CompositionCRD. - Validate user input during
kubectl apply. - Provide metadata for UI generation in the Krateo Control Plane.