templates

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 19 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdvancedTemplateFuncMap

func AdvancedTemplateFuncMap(config *rest.Config, logger logr.Logger) template.FuncMap

AdvancedTemplateFuncMap to add Sprig and additional templating functions

func IsJSONArray

func IsJSONArray(data []byte) bool

IsJSONArray checks to see if a byte array containing JSON is an array of data

func NewLookupFunction

func NewLookupFunction(config *rest.Config, logger logr.Logger) lookupFunc

NewLookupFunction get information at runtime from cluster

func ProcessTemplate

func ProcessTemplate(context context.Context, data interface{}, template *template.Template) (*unstructured.Unstructured, error)

ProcessTemplate processes an initialized Go template with a set of data. It expects one API object to be defined in the template requires a context with log

func ProcessTemplateArray

func ProcessTemplateArray(context context.Context, data interface{}, template *template.Template) ([]unstructured.Unstructured, error)

ProcessTemplateArray processes an initialized Go template with a set of data. It expects an arrays of API objects to be defined in the template. Dishomogeneus types are supported requires a context with log

func ValidateUnstructured

func ValidateUnstructured(context context.Context, obj *unstructured.Unstructured, validationSchema validation.Schema) error

ValidateUnstructured validates the content of an unstructured against an openapi schema. the schema is intended to be retrieved from a running instance of kubernetes, but other usages are possible. requires a context with log

Types

This section is empty.

Jump to

Keyboard shortcuts

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