cuestomize

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// InputFillPath is the CUE path in which the input resources will be injected into the CUE model.
	InputFillPath = "input"
	// IncludesFillPath is the CUE path in which the includes will be injected into the CUE model.
	IncludesFillPath = "includes"

	// OutputsPath is the CUE path in which the function expects the output resources (as a list) to be placed.
	OutputsPath = "outputs"
)
View Source
const (
	// APIVersionFillPath is the CUE path in which the API version of the KRMInput will be filled.
	APIVersionFillPath = "apiVersion"
	// KindFillPath is the CUE path in which the kind of the KRMInput will be filled.
	KindFillPath = "kind"
	// MetadataFillPath is the CUE path in which the metadata of the KRMInput will be filled.
	MetadataFillPath = "metadata"
)
View Source
const (
	// ValidatorAnnotationKey is the annotation key that marks a CUE function as a validator.
	ValidatorAnnotationKey = "config.cuestomize.io/validator"
	// ValidatorAnnotationValue is the value of the annotation that marks a CUE function as a validator.
	ValidatorAnnotationValue = "true"
)
View Source
const (
	// DefaultResourcesPath is the default path to the directory containing the CUE resources.
	DefaultResourcesPath = "/cue-resources"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CUEstomizeFuncBuilder

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

CUEstomizeFuncBuilder is a builder for the CUEstomize KRM function.

func NewBuilder

func NewBuilder() *CUEstomizeFuncBuilder

NewBuilder creates a new CUEstomizeFuncBuilder with the default resources path.

func (*CUEstomizeFuncBuilder) Build

func (b *CUEstomizeFuncBuilder) Build() (func([]*kyaml.RNode) ([]*kyaml.RNode, error), error)

Build returns a function that can be used to generate resources from a CUE configuration and some input resources.

func (*CUEstomizeFuncBuilder) SetConfig

SetConfig sets the reference to the configuration object that the KRM function will receive in input.

func (*CUEstomizeFuncBuilder) SetResourcesPath

func (b *CUEstomizeFuncBuilder) SetResourcesPath(resourcesPath string) *CUEstomizeFuncBuilder

SetResourcesPath sets the path to the directory containing the CUE resources.

type KRMFunction

type KRMFunction = func([]*kyaml.RNode) ([]*kyaml.RNode, error)

KRMFunction is the function type of Kustomize KRM functions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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