dpuflavortemplate

package
v0.0.0-...-293add8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL