Documentation ¶
Index ¶
- Variables
- func NewConfigMapRefError(source v1alpha1.ObjectKeyValueSource, cause error) error
- func NewFormatError(format string, cause error) error
- func NewKeyError(key string) error
- func NewOptionsError(options []string) error
- func NewPackageRefError(source v1alpha1.PackageValueSource, cause error) error
- func NewPatternError(pattern string) error
- func NewSecretRefError(source v1alpha1.ObjectKeyValueSource, cause error) error
- func NewValidationError(name string, cause error) error
- func NewValueTypeError(t v1alpha1.ValueType) error
- func ValidatePackage(manifest v1alpha1.PackageManifest, pkg *v1alpha1.Package) error
- func ValidateResolvedValues(manifest v1alpha1.PackageManifest, values map[string]string) error
- func ValidateSingle(name string, def v1alpha1.ValueDefinition, value string) (err error)
- func ValueAsString(value v1alpha1.ValueConfiguration) string
- type KeyError
- type Resolver
- type TargetPatch
- type TargetPatches
- type ValueTypeError
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 NewKeyError ¶
func NewOptionsError ¶
func NewPackageRefError ¶
func NewPackageRefError(source v1alpha1.PackageValueSource, cause error) error
func NewPatternError ¶
func NewSecretRefError ¶
func NewSecretRefError(source v1alpha1.ObjectKeyValueSource, cause error) error
func NewValidationError ¶
func NewValueTypeError ¶
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 Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func NewResolver(pkg adapter.PackageClientAdapter, client adapter.KubernetesClientAdapter) *Resolver
func (*Resolver) ResolveValue ¶
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
Click to show internal directories.
Click to hide internal directories.