utils

package
v1.77.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationKeyReconciliationGracefullyPaused = "krateo.io/gracefully-paused"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LabelsPostRender

type LabelsPostRender struct {
	UID                  types.UID
	CompositionGVR       schema.GroupVersionResource
	CompositionName      string
	CompositionNamespace string
	CompositionGVK       schema.GroupVersionKind
	KrateoNamespace      string
	// Traceparent/Tracestate, when set, are stamped as krateo.io/traceparent (+ tracestate)
	// annotations on every rendered child manifest, so the controller that reconciles the
	// child continues the distributed trace across the compose-of-compositions tree.
	Traceparent string
	Tracestate  string
}

func LabelPostRenderFromSpec

func LabelPostRenderFromSpec(mg *unstructured.Unstructured, pluralizer pluralizer, krateoNamespace string) (*LabelsPostRender, error)

func (*LabelsPostRender) Run

func (r *LabelsPostRender) Run(renderedManifests *bytes.Buffer) (modifiedManifests *bytes.Buffer, err error)

func (*LabelsPostRender) WithTraceparent

func (r *LabelsPostRender) WithTraceparent(traceparent, tracestate string) *LabelsPostRender

WithTraceparent sets the W3C traceparent (+ optional tracestate) to stamp as the krateo.io/traceparent annotation on every rendered child manifest. Returns r for chaining. Additive: callers that don't set it keep the existing label-only behavior.

type Values

type Values map[string]any

func ValuesFromSpec

func ValuesFromSpec(un *unstructured.Unstructured) (Values, error)

ValuesFromSpec returns an object's .spec as Helm values.

A MISSING spec is "no values", exactly like `spec: {}` (#42). An object of a Kind whose schema declares no properties — a composition of a parameter-less blueprint — has no spec at all: the apiserver keeps an empty spec out of the object, and clients prune empty objects before they send it. Treating that as an error failed every reconcile of such a composition (chart-inspector answered 500, so the chart never rendered). The result is a non-nil map, because callers write into it (InjectGlobalValues). A spec that exists but is not a map is still an error.

func (Values) InjectGlobalValues

func (v Values) InjectGlobalValues(mg *unstructured.Unstructured, pluralizer pluralizer, krateoNamespace string) error

Jump to

Keyboard shortcuts

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