Chary
A generic Helm chart that lets you create customized charts and templates directly from values.yaml or raw Kubernetes manifest files.
Features
- Reuse one chart across multiple apps
- Modify resources and templates directly from
values.yaml - Customize resources using standard manifest structure
Usage
As remote chart
-
Add repo
helm repo add chary https://0zhu.github.io/chary -
Create
values.yamlfile with your manifestsmanifests: - kind: Deployment # ... -
Deploy
helm upgrade --install myapp chary/chary -f values.yaml
As dependency subchart
-
Add
Charyto yourChart.yamlapiVersion: v2 name: myapp version: 0.1.0 appVersion: "1.16.0" dependencies: - name: chary version: "*" # https://github.com/0zhu/chary/tags repository: "https://0zhu.github.io/chary" -
Create
values.yamlfile with your manifestschary: manifests: - kind: Deployment # ... -
Deploy
helm upgrade --install myapp . -f values.yaml
As dependency subchart with local context and files
-
Add
Charyto yourChart.yaml -
Add
Chary’s helper function to yourtemplates/manifests.yaml{{ include "chary.manifests" . }} -
Create
values.yamlfile with your manifestsmanifests: - kind: Deployment # parent chart's files and context become available for templating - kind: ConfigMap data: config: | {{- .Files.Get "config.txt" | nindent 4 }}You can also add manifests as yaml files in
manifests/:kind: Deployment # ... -
Deploy
helm upgrade --install myapp . -f values.yaml
Customization
For examples of templating and guidance on modifying manifests, refer to the default values.yaml file.
Contributing
Add predefined manifests to templates/manifests/ and reference them in templates/_manifests.tpl.