v1alpha1

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the wavefront v1alpha1 API group. +kubebuilder:object:generate=true +groupName=wavefront.as-code.io

Index

Constants

View Source
const (
	ConditionReady      = "Ready"
	ConditionGraphValid = "GraphValid"
)
View Source
const (
	ReadyReasonSucceeded            = "Succeeded"
	ReadyReasonReconciliationFailed = "ReconciliationFailed"
)

Ready condition reasons.

View Source
const (
	GraphValidReasonValid           = "Valid"
	GraphValidReasonSelectorOverlap = "SelectorOverlap"
	GraphValidReasonCyclesDetected  = "CyclesDetected"
)

GraphValid condition reasons.

View Source
const (
	HoldReasonHandPin = "HandPin"
	HoldReasonSuspend = "Suspend"
)

Hold reasons; match the enum on HeldNode.Reason.

View Source
const MembersCap = 2000

MembersCap bounds status.members; beyond it MembersOmitted counts the rest.

View Source
const StatusListCap = 20

StatusListCap bounds the Blocked and Held status lists.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects.
	// This name is used by applyconfiguration generators (e.g. controller-gen).
	SchemeGroupVersion = schema.GroupVersion{Group: "wavefront.as-code.io", Version: "v1alpha1"}

	// GroupVersion is an alias for SchemeGroupVersion, for backward compatibility.
	GroupVersion = SchemeGroupVersion

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(func(scheme *runtime.Scheme) error {
		metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
		return nil
	})

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type BlockedNode

type BlockedNode struct {
	Node     NodeReference  `json:"node"`
	Since    metav1.Time    `json:"since"`
	Reason   string         `json:"reason"`
	Ancestor *NodeReference `json:"ancestor,omitempty"`
}

func (*BlockedNode) DeepCopy

func (in *BlockedNode) DeepCopy() *BlockedNode

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockedNode.

func (*BlockedNode) DeepCopyInto

func (in *BlockedNode) DeepCopyInto(out *BlockedNode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BlockedRef

type BlockedRef struct {
	// Reason is the engine's BlockedReason (AncestorUnhealthy, AncestorPending, AncestorHeld,
	// AncestorUnobserved, SelfHeld, GraphCycle, SharedSourceBlocked).
	Reason   string         `json:"reason"`
	Ancestor *NodeReference `json:"ancestor,omitempty"`
}

BlockedRef attributes a blocked node to its nearest unsettled ancestor.

func (*BlockedRef) DeepCopy

func (in *BlockedRef) DeepCopy() *BlockedRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockedRef.

func (*BlockedRef) DeepCopyInto

func (in *BlockedRef) DeepCopyInto(out *BlockedRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HeldNode

type HeldNode struct {
	Node   NodeReference `json:"node"`
	Source string        `json:"source"` // "<namespace>/<name>" of the GitRepository
	// Manager names the foreign field manager owning spec.ref.commit; empty
	// for a Suspend hold, which has no owning actor.
	// +optional
	Manager string `json:"manager,omitempty"`
	// Reason distinguishes how the source is held: a foreign field manager
	// owning spec.ref.commit (HandPin) or spec.suspend (Suspend).
	// +kubebuilder:validation:Enum=HandPin;Suspend
	// +optional
	Reason string `json:"reason,omitempty"`
}

func (*HeldNode) DeepCopy

func (in *HeldNode) DeepCopy() *HeldNode

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeldNode.

func (*HeldNode) DeepCopyInto

func (in *HeldNode) DeepCopyInto(out *HeldNode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Member

type Member struct {
	Node NodeReference `json:"node"`
	// +kubebuilder:validation:Enum=Pinned;Gate
	Role string `json:"role"`
	// +kubebuilder:validation:Enum=Settled;Pending;Admissible;Converging;Unhealthy
	State string `json:"state"`
	// +listType=atomic
	DependsOn    []NodeReference `json:"dependsOn,omitempty"` // graph edges, so status is self-contained
	Source       string          `json:"source,omitempty"`    // "<ns>/<name>" of the GitRepository (pinned nodes)
	Pin          string          `json:"pin,omitempty"`
	ObservedSHA  string          `json:"observedSHA,omitempty"` // "" = unobserved this pass
	PendingSince *metav1.Time    `json:"pendingSince,omitempty"`
	Ready        bool            `json:"ready"`
	Held         bool            `json:"held,omitempty"`
	Blocked      *BlockedRef     `json:"blocked,omitempty"`
}

Member is one evaluated node's derived state for the last evaluation (selected nodes and the gate nodes reached through dependsOn). Write-only output: the reconciler never reads it back.

func (*Member) DeepCopy

func (in *Member) DeepCopy() *Member

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Member.

func (*Member) DeepCopyInto

func (in *Member) DeepCopyInto(out *Member)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Mode

type Mode string

Mode controls whether admissions are executed or only reported. +kubebuilder:validation:Enum=Shadow;Enforce

const (
	ModeShadow  Mode = "Shadow"
	ModeEnforce Mode = "Enforce"
)

type NodeCounts

type NodeCounts struct {
	Observed   int `json:"observed"`
	Pinned     int `json:"pinned"`
	Gates      int `json:"gates"`
	Pending    int `json:"pending"`
	Converging int `json:"converging"`
	Blocked    int `json:"blocked"`
	Held       int `json:"held"`
}

func (*NodeCounts) DeepCopy

func (in *NodeCounts) DeepCopy() *NodeCounts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCounts.

func (*NodeCounts) DeepCopyInto

func (in *NodeCounts) DeepCopyInto(out *NodeCounts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeReference

type NodeReference struct {
	// +kubebuilder:validation:Enum=Kustomization
	Kind      string `json:"kind"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

NodeReference identifies a graph node. Typed {kind, namespace, name} from day one so HelmRelease nodes are a non-breaking addition later.

func (*NodeReference) DeepCopy

func (in *NodeReference) DeepCopy() *NodeReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeReference.

func (*NodeReference) DeepCopyInto

func (in *NodeReference) DeepCopyInto(out *NodeReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodesSpec

type NodesSpec struct {
	// Kinds of node resources to graph. v1alpha1 supports only Kustomization.
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=1
	// +kubebuilder:validation:XValidation:rule="self.all(k, k == 'Kustomization')",message="only Kustomization nodes are supported"
	Kinds []string `json:"kinds"`
	// Selector matches graph-member node resources across all namespaces.
	Selector metav1.LabelSelector `json:"selector"`
}

func (*NodesSpec) DeepCopy

func (in *NodesSpec) DeepCopy() *NodesSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodesSpec.

func (*NodesSpec) DeepCopyInto

func (in *NodesSpec) DeepCopyInto(out *NodesSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Phase

type Phase string

Phase summarises fleet admission state. +kubebuilder:validation:Enum=Quiescent;Advancing;Blocked

const (
	PhaseQuiescent Phase = "Quiescent"
	PhaseAdvancing Phase = "Advancing"
	PhaseBlocked   Phase = "Blocked"
)

type PollSpec

type PollSpec struct {
	// Interval between ref-advertisement polling sweeps.
	// +kubebuilder:default="90s"
	// +kubebuilder:validation:XValidation:rule="self.matches('^([0-9]+([.][0-9]+)?(ms|s|m|h))+$')",message="interval must be a valid Go duration (e.g. \"90s\", \"1h30m\")"
	Interval metav1.Duration `json:"interval,omitempty"`
	// PerHostConcurrency bounds concurrent ref listings per git host.
	// +kubebuilder:default=4
	// +kubebuilder:validation:Minimum=1
	PerHostConcurrency int `json:"perHostConcurrency,omitempty"`
}

func (*PollSpec) DeepCopy

func (in *PollSpec) DeepCopy() *PollSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PollSpec.

func (*PollSpec) DeepCopyInto

func (in *PollSpec) DeepCopyInto(out *PollSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ShadowAdmission

type ShadowAdmission struct {
	// Source is the "<namespace>/<name>" of the GitRepository.
	Source string `json:"source"`
	// To is the SHA that would be pinned.
	To string `json:"to"`
}

ShadowAdmission records a would-be admission announced in Shadow mode: the pin write the controller would have performed in Enforce.

func (*ShadowAdmission) DeepCopy

func (in *ShadowAdmission) DeepCopy() *ShadowAdmission

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShadowAdmission.

func (*ShadowAdmission) DeepCopyInto

func (in *ShadowAdmission) DeepCopyInto(out *ShadowAdmission)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Wavefront

type Wavefront struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// spec defines the desired state of Wavefront
	// +required
	Spec WavefrontSpec `json:"spec"`

	// status defines the observed state of Wavefront
	// +optional
	Status WavefrontStatus `json:"status,omitzero"`
}

Wavefront is the Schema for the wavefronts API

func (*Wavefront) DeepCopy

func (in *Wavefront) DeepCopy() *Wavefront

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Wavefront.

func (*Wavefront) DeepCopyInto

func (in *Wavefront) DeepCopyInto(out *Wavefront)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Wavefront) DeepCopyObject

func (in *Wavefront) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Wavefront) GetConditions

func (in *Wavefront) GetConditions() []metav1.Condition

GetConditions returns the status conditions, satisfying fluxcd/pkg/runtime/conditions.Getter.

func (*Wavefront) SetConditions

func (in *Wavefront) SetConditions(conditions []metav1.Condition)

SetConditions sets the status conditions, satisfying fluxcd/pkg/runtime/conditions.Setter.

type WavefrontList

type WavefrontList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`
	Items           []Wavefront `json:"items"`
}

WavefrontList contains a list of Wavefront

func (*WavefrontList) DeepCopy

func (in *WavefrontList) DeepCopy() *WavefrontList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WavefrontList.

func (*WavefrontList) DeepCopyInto

func (in *WavefrontList) DeepCopyInto(out *WavefrontList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WavefrontList) DeepCopyObject

func (in *WavefrontList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WavefrontSpec

type WavefrontSpec struct {
	Nodes NodesSpec `json:"nodes"`
	// +kubebuilder:default=Shadow
	Mode Mode `json:"mode,omitempty"`
	// Suspend freezes all pin writes; detection and status continue.
	Suspend bool `json:"suspend,omitempty"`
	// +kubebuilder:default={}
	Poll PollSpec `json:"poll,omitempty"`
}

WavefrontSpec defines the desired state of Wavefront

func (*WavefrontSpec) DeepCopy

func (in *WavefrontSpec) DeepCopy() *WavefrontSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WavefrontSpec.

func (*WavefrontSpec) DeepCopyInto

func (in *WavefrontSpec) DeepCopyInto(out *WavefrontSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WavefrontStatus

type WavefrontStatus struct {
	Phase Phase      `json:"phase,omitempty"`
	Nodes NodeCounts `json:"nodes,omitempty"`
	// Blocked and Held are capped exceptional-state lists (see StatusListCap);
	// the counts in Nodes are authoritative.
	// +listType=atomic
	Blocked []BlockedNode `json:"blocked,omitempty"`
	// +listType=atomic
	Held []HeldNode `json:"held,omitempty"`
	// Shadow lists would-be admissions already announced in Shadow mode
	// (capped at StatusListCap); the edge-trigger ledger for ShadowAdmission
	// events and the shadow admissions counter.
	// +listType=atomic
	// +optional
	Shadow []ShadowAdmission `json:"shadow,omitempty"`
	// +listType=map
	// +listMapKey=type
	Conditions         []metav1.Condition `json:"conditions,omitempty"`
	ObservedGeneration int64              `json:"observedGeneration,omitempty"`
	// Members lists every evaluated node's derived state (selected nodes and the
	// gate nodes reached through dependsOn), sorted by kind/namespace/name,
	// capped at MembersCap; MembersOmitted counts the rest.
	// +listType=atomic
	// +optional
	Members []Member `json:"members,omitempty"`
	// +optional
	MembersOmitted int `json:"membersOmitted,omitempty"`
	// LastEvaluated is advanced at most once per spec.poll.interval so that
	// watch-triggered reconciles do not rewrite status every pass.
	// +optional
	LastEvaluated *metav1.Time `json:"lastEvaluated,omitempty"`
}

WavefrontStatus defines the observed state of Wavefront.

func (*WavefrontStatus) DeepCopy

func (in *WavefrontStatus) DeepCopy() *WavefrontStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WavefrontStatus.

func (*WavefrontStatus) DeepCopyInto

func (in *WavefrontStatus) DeepCopyInto(out *WavefrontStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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