What Are Templates?
Templates store source configurations that describe your application’s deployment. When you create a product, CNAP automatically creates a template from your Helm sources, then generates a versioned package that can be deployed to your clusters.How Templates Work
Template Lifecycle
- Create - Template is created from Helm sources (automatically when creating a product)
- Package Generation - CNAP generates a versioned package from the template
- Deployment - Package is deployed to your clusters
Learn More
Understand how packages are automatically generated from templates
Template Sources
Templates can include multiple types of sources:Helm Charts
- Standard Helm charts from repositories (HTTP, OCI, or Git)
- Examples: PostgreSQL, Redis, NGINX from Artifact Hub
- Values are nested under the chart name or alias
Custom Kubernetes Manifests
- Raw Kubernetes resources (, , , custom CRDs)
- Placed directly in the chart’s
templates/directory - Values merge at the root level
Mixed Sources
- Combine Helm charts and custom in a single template
- All sources are composed into one unified Helm chart
- Dependencies are automatically bundled
Templates and Products
When you create a product:- Template Creation - A template is automatically created from your Helm sources
- Package Generation - CNAP generates a versioned package (e.g.,
0.1.0) - Product Association - The product references the template and adds pricing
- Customer Deployment - When customers purchase, the package is deployed to your clusters
Direct Installs
Templates can also be deployed directly without creating a product:- No Pricing - Deploy applications without Stripe integration
- Internal Tools - Perfect for internal services, monitoring, or development tools
- Same Package Generation - Still benefits from automatic package generation and versioning
Why Templates Are Powerful
Templates solve the complexity of managing multiple deployment sources:One Template, Many Uses
- Reusability - One template can power multiple products or direct installs
- Consistency - Same configuration deployed the same way every time
- Efficiency - Define once, deploy everywhere
Automatic Package Generation
When you create a template, CNAP automatically:- Generates a Versioned Package - Creates a self-contained Helm package
- Bundles Dependencies - All Helm charts and manifests combined into one package
- Locks Versions - No “latest” references, everything is pinned
- Validates - Runs
helm lintto ensure package quality
Self-Contained & Reliable
- Works Offline - All dependencies bundled, no external fetches needed
- Source Independent - Package works even if original sources become unavailable
- Single Download - One package contains everything
Standard & Portable
- Standard Helm Format - Works with all Helm tools and workflows
- Portable - Generated packages can be used outside CNAP
- Tool Compatible - Use
helm template,helm lint, and all Helm plugins
Template Benefits
- Reusability - One template can power multiple products or direct installs
- Versioning - Automatic semantic versioning (e.g.,
0.1.0,0.1.1) - Self-Contained - All dependencies bundled in the generated package
- Standard Helm - Works with all Helm tooling and GitOps workflows
- Automatic Updates - Packages regenerate when templates are updated
Template Structure
A template consists of:- Name - Display name for the template
- Helm Sources - Array of Helm charts and/or custom manifests
- Values - Configuration values for each source
- Metadata - Additional information (GitHub workflow runs, Artifact Hub data, and more)
When Templates Are Created
Templates are automatically created in these scenarios:- Product Creation - When you create a product with Helm sources
- Product Update - When you update a product’s sources (template is updated)
- Direct Install - When you create a standalone install with Helm sources
Package Generation
When a template is created or updated, CNAP automatically:- Generates a standard Helm package structure
- Packages all dependencies into a single package
- Creates a versioned release following semantic versioning
- Stores the package for deployment
Package Generation Details
Learn how CNAP generates packages from templates