Documentation
¶
Overview ¶
Package dpuflavortemplate renders a DPUFlavorTemplate body into a concrete DPUFlavor using per-device values from DPUDevice.spec.values.
Rendering is hardened for availability: the template body and the rendered output are size-bounded, execution panics are converted into render errors, and {{define}}, {{block}} and {{template}} actions are rejected statically because template invocation enables unbounded recursion, and stack exhaustion cannot be recovered.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hash ¶
func Hash(spec provisioningv1.DPUFlavorTemplateSpec) (string, error)
Hash returns a short, stable hash of the render inputs: the template body plus the two structured resource-fitting fields. A change to any of these means the generated DPUFlavor may differ and drift detection must re-evaluate.
func Render ¶
func Render(spec provisioningv1.DPUFlavorTemplateSpec, values *runtime.RawExtension) (*provisioningv1.DPUFlavor, error)
Render executes the template body against the given values and unmarshals the result into a typed DPUFlavor. The dpuResources and systemReservedResources fields from the template spec are not templated: when set they take precedence and are stamped onto the returned flavor's spec, overriding anything the rendered body may contain.
func ValuesHash ¶
func ValuesHash(values *runtime.RawExtension) (string, error)
ValuesHash returns a short, stable hash of DPUDevice.spec.values.
Types ¶
This section is empty.