values

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepMergeInto

func DeepMergeInto(dst, override map[string]any) map[string]any

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

func ResolvedSubstitutionActive(inputs []Result) bool

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

func SubstitutionNames(data []byte) map[string]struct{}

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

func UnreadableValueReferences(inputs []Result) []manifest.Reference

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 Demand

type Demand uint8

Demand limits a decision to the material its consumer needs.

const (
	ObjectDemand Demand = iota + 1
	SubstitutionDemand
	HelmDemand
	SourceDemand
)

Demands separate object existence from selected material.

type Effect

type Effect uint8

Effect MUST distinguish unresolved results from each authorized operation.

const (
	Used Effect = iota + 1
	Omitted
	Deferred
	Failed
)

Effects are final decisions for one captured input.

type ResolveRequest

type ResolveRequest struct {
	Reference       manifest.Reference
	Facts           store.ReferenceFacts
	Permission      missingPolicy
	Demand          Demand
	Settlement      Settlement
	Failure         error
	Ambient         bool
	Unavailable     error
	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

func (r *Result) Admitted() bool

Admitted projects invocation permission without waiting or warning publication.

func (*Result) CanPrepare

func (r *Result) CanPrepare() bool

CanPrepare requires certainty before speculative construction.

func (*Result) Cause

func (r *Result) Cause() string

Cause retains the actionable unavailable-material reason.

func (*Result) Data

func (r *Result) Data() manifest.Data

Data MUST remain immutable and preserves lazy selected-key decoding.

func (*Result) Effect

func (r *Result) Effect() Effect

Effect MUST be consumed without deriving permission again.

func (*Result) Err

func (r *Result) Err() error

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

func (r *Result) KeysComplete() bool

KeysComplete permits a missing-key conclusion only for complete coverage.

func (*Result) KnownKey

func (r *Result) KnownKey() bool

KnownKey distinguishes selected-key membership from readability.

func (*Result) MaterialError

func (r *Result) MaterialError() error

MaterialError excludes unreadable data from malformed consumed material.

func (*Result) Materialized

func (r *Result) Materialized() bool

Materialized answers only the captured demand, including object presence for ObjectDemand.

func (*Result) NeedsInput

func (r *Result) NeedsInput() bool

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) Position

func (r *Result) Position() int

Position retains the original index before declaration filtering.

func (*Result) Present

func (r *Result) Present() bool

Present includes qualifying production without inventing data.

func (*Result) Reference

func (r *Result) Reference() manifest.Reference

Reference MUST remain immutable after capture.

func (*Result) ReportWarnings

func (r *Result) ReportWarnings(reads *store.ReadSet)

ReportWarnings MUST publish only through an accepted consuming assessment.

func (*Result) RequiresData

func (r *Result) RequiresData() bool

RequiresData distinguishes required material from satisfied unreadable projections.

func (*Result) StaticCertain

func (r *Result) StaticCertain() bool

StaticCertain never treats a projected empty value as a known source path.

func (*Result) UnreadableInput

func (r *Result) UnreadableInput() bool

UnreadableInput retains required substitution provenance independently of warnings.

func (*Result) UnreadableKeys

func (r *Result) UnreadableKeys() []string

UnreadableKeys borrows sorted names that MUST remain immutable.

func (*Result) Value

func (r *Result) Value() string

Value never exposes ciphertext as readable data.

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

Lookup captures a values object and its materializers once for expansion and diagnostics.

Jump to

Keyboard shortcuts

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