Documentation
¶
Overview ¶
Package engine implements ordered Helm-values-style merging and provenance.
Index ¶
- func Overrides(r *Result) []string
- func ParseSet(expression string, stringValues bool) (map[string]any, error)
- func SortedPaths(records map[string]*ValueRecord) []string
- type Assignment
- type AssignmentAction
- type FileResult
- type Layer
- type Options
- type Result
- type SetSource
- type SourceLocation
- type ValueID
- type ValueKind
- type ValueRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Overrides ¶
Overrides returns the leaf paths (not maps) that were assigned more than once, sorted. A map is assigned once per layer that touches any of its keys, so listing maps would only repeat their children.
func ParseSet ¶
ParseSet parses a helm --set expression, or a --set-string expression when stringValues is true.
func SortedPaths ¶
func SortedPaths(records map[string]*ValueRecord) []string
Types ¶
type Assignment ¶
type Assignment struct {
Source SourceLocation `json:"source"`
Value any `json:"value"`
Kind ValueKind `json:"kind"`
Action AssignmentAction `json:"action"`
Effective bool `json:"effective"`
}
type AssignmentAction ¶
type AssignmentAction string
const ( ActionDefined AssignmentAction = "defined" ActionOverridden AssignmentAction = "overridden" ActionIdenticalRedefinition AssignmentAction = "identical-redefinition" ActionTypeChanged AssignmentAction = "type-change" )
type FileResult ¶
type Layer ¶
Layer is one values file in merge order. Name is how sources refer to it: a path, or a template marked as rendered.
func ReadLayers ¶
ReadLayers reads values files from disk into layers named by their path.
type Result ¶
type Result struct {
Target string
Application string
Chart string
Values map[string]any
Records map[string]*ValueRecord
Files []FileResult
}
type SetSource ¶
type SetSource struct {
Expression string
Source SourceLocation
StringValues bool
}
SetSource is a Helm strvals expression with an explicit provenance label. StringValues matches Helm parameters, whose values are always strings.
func SetSources ¶
SetSources turns user --set expressions into set sources labelled --set:N.
type SourceLocation ¶
type ValueRecord ¶
type ValueRecord struct {
ID ValueID `json:"id"`
EffectiveValue any `json:"effectiveValue"`
EffectiveSource SourceLocation `json:"effectiveSource"`
History []Assignment `json:"history"`
}