Question
Template-side slicing vs external pre-filtering for large Helm datasets
Lax Atlas
0 reputation · 08 Mar 2021, 08:08 UTC
84.8K views0
When managing large lists of resources within a Helm chart, such as hundreds of Ingress rules or monitoring configurations, the rendering process can become a bottleneck. One approach to limit the output is using the Go template
range function combined with an index check to slice the list during the template generation phase.
However, this requires the Helm binary to parse the entire dataset from values.yaml into memory, which can lead to high overhead or timeouts during helm upgrade operations. The alternative is to move the pagination logic to the CI/CD pipeline or an external script, passing only the necessary subset of data to the chart values.
What are the specific performance trade-offs between using template-side indexing and external pre-filtering for datasets exceeding several thousand entries? Are there documented limits on the memory consumption of the values object that make template-side slicing impractical?