engine

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unstructured

func Unstructured(payload []byte) (chartutil.Values, error)

Unstructured converts a JSON payload into a chartutil.Values.

func UnstructuredType

func UnstructuredType(item interface{}) (chartutil.Values, error)

UnstructuredType converts an unstructured item into a chartutil.Values.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine represents the template engine.

func NewEngine

func NewEngine(kube *k8s.Kube, templatePayload string) *Engine

NewEngine instantiates the template engine.

func (*Engine) Render

func (e *Engine) Render(variables *Variables) ([]byte, error)

Render renders the template with the given variables.

type LookupFn

type LookupFn func(string, string, string, string) (map[string]interface{}, error)

type LookupFuncs

type LookupFuncs struct {
	// contains filtered or unexported fields
}

LookupFuncs represents the template functions that will need to lookup Kubernetes resources.

func NewLookupFuncs

func NewLookupFuncs(kube *k8s.Kube) *LookupFuncs

NewLookupFuncs creates a new LookupFuncs instance.

func (*LookupFuncs) Lookup

func (l *LookupFuncs) Lookup() LookupFn

type Variables

type Variables struct {
	Installer chartutil.Values // .Installer
	OpenShift chartutil.Values // .OpenShift
}

Variables represents the variables available for "values-template" file.

func NewVariables

func NewVariables() *Variables

NewVariables instantiates Variables empty.

func (*Variables) SetInstaller

func (v *Variables) SetInstaller(cfg *config.Spec) error

SetInstaller sets the installer configuration.

func (*Variables) SetOpenShift

func (v *Variables) SetOpenShift(ctx context.Context, kube *k8s.Kube) error

SetOpenShift sets the OpenShift context variables.

func (*Variables) Unstructured

func (v *Variables) Unstructured() (chartutil.Values, error)

Unstructured returns the variables as "chartutils.Values".

Jump to

Keyboard shortcuts

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