adapter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package adapter provides the node adapter seam (DESIGN §4.3, D12): a per-kind interpretation of graph members that keeps the graph, engine, and reconciler kind-agnostic. v1alpha1 ships only the Kustomization adapter; a future HelmRelease adapter is a non-breaking addition behind the same interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Kind() string
	// List returns all nodes matching sel across all namespaces.
	List(ctx context.Context, r client.Reader, sel labels.Selector) ([]Node, error)
	// Get fetches a single node (used for dependsOn targets outside the selector).
	// Returns (Node{}, false, nil) when the resource does not exist.
	Get(ctx context.Context, r client.Reader, ref NodeRef) (Node, bool, error)
}

Adapter interprets one node kind (DESIGN §4.3, D12).

func NewKustomizationAdapter

func NewKustomizationAdapter() Adapter

NewKustomizationAdapter returns the Adapter for Kustomization nodes.

type Node

type Node struct {
	Ref       NodeRef
	DependsOn []NodeRef             // same-kind, namespace-defaulted to the node's
	SourceRef *types.NamespacedName // referenced GitRepository; nil when sourceRef is not a GitRepository
	Readiness Readiness
	Labels    map[string]string
}

Node is the adapter's read of one graph member.

type NodeRef

type NodeRef struct {
	Kind      string `json:"kind"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

NodeRef identifies a node; Kind distinguishes future HelmRelease planes.

func (NodeRef) String

func (r NodeRef) String() string

String renders the reference as "Kind/ns/name".

type Readiness

type Readiness struct {
	Ready      bool   // Ready condition True AND status.observedGeneration == metadata.generation
	Failing    bool   // Ready condition explicitly False (unhealthy, not merely converging)
	Message    string // Ready condition message (for status attribution)
	AppliedSHA string // 40-hex SHA parsed from status.lastAppliedRevision ("" if none)
}

Readiness is the uniform health signal (DESIGN D7).

Jump to

Keyboard shortcuts

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