chartutil package - github.com/fluxcd/pkg/chartutil - Go Packages

This section is empty.

View Source

var (
	
	
	ErrResourceNotFound = errors.New("resource not found")
	
	
	ErrKeyNotFound = errors.New("key not found")
	
	
	ErrUnsupportedRefKind = errors.New("unsupported values reference kind")
	
	
	ErrValuesDataRead = errors.New("failed to read values data")
	
	
	ErrValueMerge = errors.New("failed to merge value")
	
	ErrUnknown = errors.New("unknown error")
)

ChartValuesFromReferences attempts to construct new chart values by resolving the provided references using the client, merging them in the order given. If provided, the values map is merged in last overwriting values from references, unless a reference has a targetPath specified, in which case it will overwrite all. It returns the merged values, or an ErrValuesReference error.

DigestValues calculates the digest of the values using the provided algorithm. The caller is responsible for ensuring that the algorithm is supported.

Encode encodes the given data to YAML format and writes it to the provided io.Write, without going through a byte representation (unlike sigs.k8s.io/yaml#Unmarshal).

It optionally takes one or more PreEncoder functions that allow for pre-processing of the data before encoding, such as sorting the data.

It returns an error if the data cannot be encoded.

ReplacePathValue replaces the value at the dot notation path with the given value using Helm's string value parser using strvals.ParseInto. Single or double-quoted values are merged using strvals.ParseIntoString.

SortMapSlice recursively sorts the given goyaml.MapSlice by key. It can be used in combination with Encode to sort YAML by key before encoding it.

VerifyValues verifies the digest of the values against the provided digest.

type ErrValuesRefReason error

ErrValuesRefReason is the descriptive reason for an ErrValuesReference.

ErrValuesReference is returned by ChartValuesFromReferences

NewErrValuesReference returns a new ErrValuesReference constructed from the provided values.

Error returns an error string constructed out of the state of ErrValuesReference.

Is returns if target == Reason, or target == Err. Can be used to Reason about a returned error:

err := &ErrValuesReference{Reason: ErrResourceNotFound, ...}
errors.Is(err, ErrResourceNotFound)

Unwrap returns the wrapped Err.

PreEncoder allows for pre-processing of the YAML data before encoding.