A generic Helm chart that lets you create customized charts and templates directly from values.yaml
or raw Kubernetes manifest files.
- Reuse one chart across multiple apps
- Modify resources and templates directly from
values.yaml
- Customize resources using standard manifest structure
-
Add repo
helm repo add chary https://0zhu.github.io/chary
-
Create
values.yaml
file with your manifestsmanifests: - kind: Deployment # ...
-
Check what's rendered
helm --debug template myapp chary/chary -f values.yaml
-
Deploy
helm install myapp chary/chary -f values.yaml
-
Set up your chart with
Chart.yaml
apiVersion: v2 name: myapp version: 0.1.0 appVersion: "1.16.0" dependencies: - name: chary version: "*" # choose from https://github.com/0zhu/chary/tags repository: "https://0zhu.github.io/chary"
-
Create
values.yaml
file with your manifests-
Pass manifests to
Chary
subchart invalues.yaml
chary: manifests: - kind: Deployment # ...
-
Or use
Chary
's helper functions-
In
templates/manifests.yaml
{{ include "chary.manifests" . }}
-
In
templates/NOTES.txt
(optional){{ include "chary.notes" . }}
-
Then define manifests in
values.yaml
manifests: - kind: Deployment # parent chart's files and context will become available for templating - kind: ConfigMap data: config: | {{- .Files.Get "config.txt" | nindent 4 }}
Optionally, store additional manifests as yaml files in
manifests/
, likemanifests/example.yaml
kind: Deployment # ...
-
-
-
Check what's rendered
helm --debug template myapp . -f values.yaml
-
Deploy
helm install myapp . -f values.yaml
For examples of templating and guidance on modifying manifests, refer to the default values.yaml
file.
Add predefined manifests to templates/manifests/
and reference them in templates/_manifests.tpl
.