Documentation
¶
Overview ¶
Package values implements HelmRelease values resolution and Kustomization postBuild substitution. It is the bridge between authored manifests and rendered manifests: it consults the central Store for ConfigMap/Secret content and merges referenced data into a HelmRelease's values map or a Kustomization's postBuild substitution table.
Two key behaviors mirror flux-local:
- Deep merge follows Helm semantics: nested maps are merged, but lists are REPLACED entirely (not concatenated).
- When a valuesFrom reference is optional and the target ConfigMap / Secret (or values key) is missing, it is skipped silently so the render proceeds.
Index ¶
- func DeepMergeInto(dst, override map[string]any) map[string]any
- func ExpandPostBuildSubstituteReference(ks *manifest.Kustomization, inputs []Result) error
- func ExpandValueReferences(hr *manifest.HelmRelease, inputs []Result, cache *Cache) error
- func OmittedIDs(inputs []Result) []manifest.NamedResource
- func ResolveStaticValue(value string, parent *manifest.Kustomization, provider provider, ...) (string, bool)
- func ResolvedSubstitutionActive(inputs []Result) bool
- func SubstitutionActive(ks *manifest.Kustomization) bool
- func SubstitutionDocument(occurrence manifest.DocOccurrence, active bool) ([]byte, error)
- func SubstitutionNames(data []byte) map[string]struct{}
- func UnreadableSubstitutions(ks *manifest.Kustomization, inputs []Result) map[string]manifest.Reference
- func UnreadableValueReferences(inputs []Result) []manifest.Reference
- type Cache
- type Demand
- type Effect
- type ResolveRequest
- type Result
- func (r *Result) Admitted() bool
- func (r *Result) CanPrepare() bool
- func (r *Result) Cause() string
- func (r *Result) Data() manifest.Data
- func (r *Result) Effect() Effect
- func (r *Result) Err() error
- func (r *Result) ID() manifest.NamedResource
- func (r *Result) KeysComplete() bool
- func (r *Result) KnownKey() bool
- func (r *Result) MaterialError() error
- func (r *Result) Materialized() bool
- func (r *Result) NeedsInput() bool
- func (r *Result) Pending() []manifest.NamedResource
- func (r *Result) Position() int
- func (r *Result) Present() bool
- func (r *Result) Reference() manifest.Reference
- func (r *Result) ReportWarnings(reads *store.ReadSet)
- func (r *Result) RequiresData() bool
- func (r *Result) StaticCertain() bool
- func (r *Result) UnreadableInput() bool
- func (r *Result) UnreadableKeys() []string
- func (r *Result) Value() string
- type Settlement
- type StoreProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepMergeInto ¶
DeepMergeInto merges override into dst using Helm's merge semantics. Callers MUST own dst. Nested inputs remain read-only; non-colliding maps and lists may be borrowed by reference.
func ExpandPostBuildSubstituteReference ¶
func ExpandPostBuildSubstituteReference(ks *manifest.Kustomization, inputs []Result) error
ExpandPostBuildSubstituteReference MUST return captured failures before mutating the declaration.
func ExpandValueReferences ¶
func ExpandValueReferences(hr *manifest.HelmRelease, inputs []Result, cache *Cache) error
ExpandValueReferences MUST consume original authored positions before filtering references.
func OmittedIDs ¶
func OmittedIDs(inputs []Result) []manifest.NamedResource
OmittedIDs MUST preserve omission identity even for warning-free references.
func ResolveStaticValue ¶
func ResolveStaticValue( value string, parent *manifest.Kustomization, provider provider, missing missingPolicy, ) (string, bool)
ResolveStaticValue never certifies a substitution that depends on unread input.
func ResolvedSubstitutionActive ¶
ResolvedSubstitutionActive MUST preserve evaluation when satisfied inputs have no readable names.
func SubstitutionActive ¶
func SubstitutionActive(ks *manifest.Kustomization) bool
SubstitutionActive requires a non-nil Kustomization with references already expanded.
func SubstitutionDocument ¶
func SubstitutionDocument(occurrence manifest.DocOccurrence, active bool) ([]byte, error)
SubstitutionDocument keeps YAML framing and document exclusions identical across callers.
func SubstitutionNames ¶
SubstitutionNames derives effective names from Flux syntax, or nil for unproved syntax.
func UnreadableSubstitutions ¶
func UnreadableSubstitutions(ks *manifest.Kustomization, inputs []Result) map[string]manifest.Reference
UnreadableSubstitutions MUST discard evidence replaced by later or inline values.
func UnreadableValueReferences ¶
UnreadableValueReferences excludes absent objects and keys proved missing.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache memoizes valuesFrom YAML by content across HelmReleases. Stored maps are immutable; callers must clone before mutation or merge with copy-on-write. The zero value is ready for concurrent use. A nil *Cache disables memoization.
type Effect ¶
type Effect uint8
Effect MUST distinguish unresolved results from each authorized operation.
type ResolveRequest ¶
type ResolveRequest struct {
Reference manifest.Reference
Facts store.ReferenceFacts
Permission missingPolicy
Demand Demand
Settlement Settlement
Failure error
Ambient bool
ProviderOnly bool
AnonymousDenied bool
}
ResolveRequest MUST retain authored identity and the facts captured for one assessment.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result owns one captured decision. Its zero value never authorizes use.
func Resolve ¶
func Resolve(request *ResolveRequest) Result
Resolve MUST be the sole policy decision for captured consumer inputs.
func (*Result) Admitted ¶
Admitted projects invocation permission without waiting or warning publication.
func (*Result) CanPrepare ¶
CanPrepare requires certainty before speculative construction.
func (*Result) Err ¶
Err MUST preserve captured errors; object absence is formatted from immutable decision facts.
func (*Result) ID ¶
func (r *Result) ID() manifest.NamedResource
ID retains the authored reference identity even when its data is absent.
func (*Result) KeysComplete ¶
KeysComplete permits a missing-key conclusion only for complete coverage.
func (*Result) MaterialError ¶
MaterialError excludes unreadable data from malformed consumed material.
func (*Result) Materialized ¶
Materialized answers only the captured demand, including object presence for ObjectDemand.
func (*Result) NeedsInput ¶
NeedsInput does not treat unknown key coverage as absent identity.
func (*Result) Pending ¶
func (r *Result) Pending() []manifest.NamedResource
Pending borrows unsettled identities that MUST remain immutable.
func (*Result) ReportWarnings ¶
ReportWarnings MUST publish only through an accepted consuming assessment.
func (*Result) RequiresData ¶
RequiresData distinguishes required material from satisfied unreadable projections.
func (*Result) StaticCertain ¶
StaticCertain never treats a projected empty value as a known source path.
func (*Result) UnreadableInput ¶
UnreadableInput retains required substitution provenance independently of warnings.
func (*Result) UnreadableKeys ¶
UnreadableKeys borrows sorted names that MUST remain immutable.
type Settlement ¶
type Settlement struct {
Pending []manifest.NamedResource
Failure error
BlocksConsumer bool
}
Settlement MUST capture terminal causes without retaining scheduler state.
type StoreProvider ¶
type StoreProvider struct {
// contains filtered or unexported fields
}
StoreProvider retains one execution's captured values and availability evidence.
func NewStoreProvider ¶
func NewStoreProvider(s dataReader) *StoreProvider
NewStoreProvider returns one execution's captured values and availability evidence.
func (*StoreProvider) Lookup ¶
func (p *StoreProvider) Lookup(id manifest.NamedResource) store.ReferenceFacts
Lookup captures a values object and its materializers once for expansion and diagnostics.