Core Engine
The core engine (jhelm-core) handles chart management and the rendering pipeline.
1. Key Classes
-
Engine.java— Main rendering engine that orchestrates template processing -
Chart.java— Represents a Helm chart with metadata and templates -
RepoManager.java— Manages Helm chart repositories
2. Rendering Pipeline
The engine handles:
-
Named template collection and caching
-
Subchart rendering with recursion prevention
-
Value merging from chart defaults and user overrides
-
Template context management (Release, Chart, Values, Capabilities, etc.)
3. Implementation Details
-
Template Rendering: The
Engineclass creates a newGoTemplatefor each render to avoid template accumulation. -
Action Classes: Logic for Helm operations is encapsulated in Action classes (e.g.,
InstallAction,UpgradeAction,RollbackAction,TemplateAction,ShowAction). -
Recursion Protection: Stack depth tracking prevents infinite template recursion.
-
Named Templates:
defineblocks are collected before rendering begins. -
Value Merging: Chart values are merged with user-provided values and release info.
-
Error Handling: Custom exceptions for parsing, execution, and not-found scenarios.