Module macro_processor

Module macro_processor 

Source
Expand description

Macro variable scoping post-processor

This module resolves bare variable references inside macro definitions to their fully qualified paths (e.g., chrootvalues.controller.image.chroot).

The problem arises from Helm’s with blocks that set a context:

{{- with .Values.controller.image }}
  {{- if .chroot }}...
{{- end }}

When converted to Jinja2 macros, the context is lost and variables become bare. This post-processor fixes that by searching values.yaml for matching keys.

Structs§

MacroDefinition
A macro definition with its name and body
MacroPostProcessor
Post-processor for macro variable scoping
UnresolvedVariable
Information about a variable that couldn’t be resolved

Enums§

ResolvedVariable
Result of resolving a variable