manifestvalues

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoDef               = errors.New("no value definition found")
	ErrConstraint          = errors.New("constraint violation")
	ErrConstraintRequired  = fmt.Errorf("%w: Required", ErrConstraint)
	ErrConstraintMin       = fmt.Errorf("%w: Min", ErrConstraint)
	ErrConstraintMax       = fmt.Errorf("%w: Max", ErrConstraint)
	ErrConstraintMinLength = fmt.Errorf("%w: MinLength", ErrConstraint)
	ErrConstraintMaxLength = fmt.Errorf("%w: MaxLength", ErrConstraint)
)

Functions

func NewConfigMapRefError

func NewConfigMapRefError(source v1alpha1.ObjectKeyValueSource, cause error) error

func NewFormatError

func NewFormatError(format string, cause error) error

func NewKeyError

func NewKeyError(key string) error

func NewOptionsError

func NewOptionsError(options []string) error

func NewPackageRefError

func NewPackageRefError(source v1alpha1.PackageValueSource, cause error) error

func NewPatternError

func NewPatternError(pattern string) error

func NewSecretRefError

func NewSecretRefError(source v1alpha1.ObjectKeyValueSource, cause error) error

func NewValidationError

func NewValidationError(name string, cause error) error

func NewValueTypeError

func NewValueTypeError(t v1alpha1.ValueType) error

func ValidatePackage

func ValidatePackage(manifest v1alpha1.PackageManifest, pkg *v1alpha1.Package) error

ValidatePackage performs a partial validation of a packages value configurations. Reference values are **not resolved**, so constraint validation is skipped for these values. If instead you want to validate **all** values, please resolve all references first, using a Resolver instance, and then use ValidateResolvedValues.

func ValidateResolvedValues

func ValidateResolvedValues(manifest v1alpha1.PackageManifest, values map[string]string) error

func ValidateSingle

func ValidateSingle(name string, def v1alpha1.ValueDefinition, value string) (err error)

func ValueAsString

func ValueAsString(value v1alpha1.ValueConfiguration) string

Types

type KeyError

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

func (*KeyError) Error

func (err *KeyError) Error() string

type Resolver

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

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, values map[string]v1alpha1.ValueConfiguration) (
	map[string]string,
	error,
)

func (*Resolver) ResolveValue

func (r *Resolver) ResolveValue(ctx context.Context, value v1alpha1.ValueConfiguration) (string, error)

type TargetPatch

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

func (*TargetPatch) ApplyToHelmRelease

func (p *TargetPatch) ApplyToHelmRelease(obj *v2beta2.HelmRelease) error

func (*TargetPatch) ApplyToResource

func (p *TargetPatch) ApplyToResource(obj object) error

func (*TargetPatch) MatchHelmRelease

func (p *TargetPatch) MatchHelmRelease(obj *v2beta2.HelmRelease) bool

func (*TargetPatch) MatchResource

func (p *TargetPatch) MatchResource(obj object) bool

type TargetPatches

type TargetPatches []TargetPatch

func GeneratePatches

func GeneratePatches(manifest v1alpha1.PackageManifest, values map[string]string) (TargetPatches, error)

GeneratePatches creates an applicable patch for each value definition in the supplied manifest that a value in values exists for. It performs no validation of the supplied values. Please run validate before using this!

func (*TargetPatches) ApplyToHelmRelease

func (patches *TargetPatches) ApplyToHelmRelease(obj *v2beta2.HelmRelease) error

func (*TargetPatches) ApplyToResource

func (patches *TargetPatches) ApplyToResource(obj object) error

type ValueTypeError

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

func (*ValueTypeError) Error

func (err *ValueTypeError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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