Helm Accessing Arbitrary Files inside Templates

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

It is OK to add extra files to the Helm chart. These files will be bundled. However, charts must be smaller than 1M because of storage limitation of Kubernetes objects. The Files object provide access to all non-special files in the chart. It cannot be used to access templates. Also, files excluded in .helmignore cannot be accessed. Charts do not preserve UNIX mode information, so file-level permissions will have no impact on the availability of a file when it comes to the .Files object.

The access is provided via several functions.

Functions

Files.Get

{{ .Files.Get <file-name> }}

Files.GetBytes