v1alpha1

package
v1.22.9 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 6 Imported by: ? 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 v1alpha1 contains the TMIComponent custom resource API for the TMI Component Platform.

+groupName=tmi.dev +kubebuilder:object:generate=true

Index

Constants

This section is empty.

Variables

View Source
var AddToScheme = SchemeBuilder.AddToScheme

AddToScheme adds the types in this group/version to a scheme.

View Source
var GroupVersion = schema.GroupVersion{Group: "tmi.dev", Version: "v1alpha1"}

GroupVersion is the group/version for the TMI Component Platform API.

View Source
var SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} //nolint:staticcheck // SA1019: see above

SchemeBuilder registers the API types into a runtime scheme. scheme.Builder is the kubebuilder-idiomatic registration pattern (.Register + .AddToScheme); the suggested runtime.SchemeBuilder has a different API and migrating would mean rewriting generated-style scaffolding for no behavior gain.

Functions

This section is empty.

Types

type AllowlistEgress

type AllowlistEgress struct {
	// CIDRs are stable destination ranges rendered as NetworkPolicy ipBlock
	// egress rules. Use for an in-cluster VM, a cloud private-endpoint subnet,
	// or a known API VIP. Validation rejects 0.0.0.0/0 and any range covering
	// the metadata IP.
	// +optional
	CIDRs []string `json:"cidrs,omitempty"`
	// ClusterPeers are in-cluster destinations rendered as namespace/pod-selector
	// egress rules (e.g. an in-cluster embedder Service's pods).
	// +optional
	ClusterPeers []ClusterPeer `json:"clusterPeers,omitempty"`
	// OpenInternet, when true, renders broad egress (0.0.0.0/0 minus RFC1918 and
	// minus the metadata IP) on the declared ports. Host-exactness is DELEGATED
	// to operator infrastructure (cloud egress firewall / managed-CNI FQDN
	// policy). The explicit escape hatch for a target that cannot be reduced to
	// a CIDR (public-SaaS model APIs).
	// +optional
	OpenInternet bool `json:"openInternet,omitempty"`
	// Ports the egress rules apply to. Defaults to TCP/443 when empty.
	// +optional
	Ports []int32 `json:"ports,omitempty"`
}

AllowlistEgress declares the server-side-enforceable egress targets for a component with egress: allowlist. At least one of CIDRs, ClusterPeers, or OpenInternet must be set (enforced by ValidateComponent). The cloud metadata IP (169.254.169.254) is never reachable regardless of what is declared here.

func (*AllowlistEgress) DeepCopy

func (in *AllowlistEgress) DeepCopy() *AllowlistEgress

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

func (*AllowlistEgress) DeepCopyInto

func (in *AllowlistEgress) DeepCopyInto(out *AllowlistEgress)

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

type ClusterPeer

type ClusterPeer struct {
	// NamespaceSelector matches destination namespaces by label. When empty,
	// the rule is not namespace-scoped (matches pods in any namespace by the
	// PodSelector).
	// +optional
	NamespaceSelector map[string]string `json:"namespaceSelector,omitempty"`
	// PodSelector matches destination pods by label.
	// +optional
	PodSelector map[string]string `json:"podSelector,omitempty"`
	// Ports the rule applies to. Defaults to TCP/443 when empty.
	// +optional
	Ports []int32 `json:"ports,omitempty"`
}

ClusterPeer selects an in-cluster egress destination by namespace and pod labels. At least one of NamespaceSelector / PodSelector must be set.

func (*ClusterPeer) DeepCopy

func (in *ClusterPeer) DeepCopy() *ClusterPeer

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

func (*ClusterPeer) DeepCopyInto

func (in *ClusterPeer) DeepCopyInto(out *ClusterPeer)

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

type EgressPosture

type EgressPosture string

EgressPosture controls the NetworkPolicy the controller renders. +kubebuilder:validation:Enum=none;fetch-controlled;allowlist

const (
	// EgressNone denies all egress except NATS. Used by parse-only workers.
	EgressNone EgressPosture = "none"
	// EgressFetchControlled allows guarded outbound fetch. RESERVED — not
	// exercised until the code extractor (a later issue).
	EgressFetchControlled EgressPosture = "fetch-controlled"
	// EgressAllowlist allows egress to specific hosts only.
	EgressAllowlist EgressPosture = "allowlist"
)

type InputMode

type InputMode string

InputMode declares how a component receives job input. +kubebuilder:validation:Enum=content-ref;source-locator

const (
	// InputContentRef means the job carries an object_ref to bytes the
	// monolith already placed in the JetStream Object Store.
	InputContentRef InputMode = "content-ref"
	// InputSourceLocator means the job carries a URL the worker fetches.
	// RESERVED — not exercised until the code extractor.
	InputSourceLocator InputMode = "source-locator"
)

type ScalingSpec

type ScalingSpec struct {
	// +kubebuilder:validation:Minimum=0
	MinReplicas int32 `json:"minReplicas"`
	// +kubebuilder:validation:Minimum=1
	MaxReplicas int32 `json:"maxReplicas"`
	// QueueDepthTarget is the JetStream pending-message count per replica
	// KEDA scales toward.
	// +kubebuilder:validation:Minimum=1
	QueueDepthTarget int32 `json:"queueDepthTarget"`
}

ScalingSpec configures the KEDA ScaledObject.

func (*ScalingSpec) DeepCopy

func (in *ScalingSpec) DeepCopy() *ScalingSpec

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

func (*ScalingSpec) DeepCopyInto

func (in *ScalingSpec) DeepCopyInto(out *ScalingSpec)

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

type ScratchVolume

type ScratchVolume struct {
	// MountPath is where the emptyDir is mounted in the worker container.
	MountPath string `json:"mountPath"`
	// SizeLimit caps the emptyDir (e.g. "512Mi"). Serialized as a string
	// in YAML; validated as a Kubernetes quantity at admission time.
	SizeLimit resource.Quantity `json:"sizeLimit"`
}

ScratchVolume requests a capped, ephemeral emptyDir mounted writable.

func (*ScratchVolume) DeepCopy

func (in *ScratchVolume) DeepCopy() *ScratchVolume

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

func (*ScratchVolume) DeepCopyInto

func (in *ScratchVolume) DeepCopyInto(out *ScratchVolume)

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

type SecretRef

type SecretRef struct {
	// Name is the logical name the worker uses to find this secret.
	Name string `json:"name"`
	// SecretName is the Kubernetes Secret object name.
	SecretName string `json:"secretName"`
	// SecretKey is the key within that Secret.
	SecretKey string `json:"secretKey"`
}

SecretRef points to a key in a Kubernetes Secret. Secrets are NEVER inlined in a TMIComponent — only referenced.

func (*SecretRef) DeepCopy

func (in *SecretRef) DeepCopy() *SecretRef

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

func (*SecretRef) DeepCopyInto

func (in *SecretRef) DeepCopyInto(out *SecretRef)

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

type TMIComponent

type TMIComponent struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TMIComponentSpec   `json:"spec,omitempty"`
	Status TMIComponentStatus `json:"status,omitempty"`
}

TMIComponent declares a TMI Component Platform worker type.

func (*TMIComponent) DeepCopy

func (in *TMIComponent) DeepCopy() *TMIComponent

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

func (*TMIComponent) DeepCopyInto

func (in *TMIComponent) DeepCopyInto(out *TMIComponent)

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

func (*TMIComponent) DeepCopyObject

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

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

type TMIComponentList

type TMIComponentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TMIComponent `json:"items"`
}

TMIComponentList is a list of TMIComponent.

func (*TMIComponentList) DeepCopy

func (in *TMIComponentList) DeepCopy() *TMIComponentList

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

func (*TMIComponentList) DeepCopyInto

func (in *TMIComponentList) DeepCopyInto(out *TMIComponentList)

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

func (*TMIComponentList) DeepCopyObject

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

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

type TMIComponentSpec

type TMIComponentSpec struct {
	// Image is the worker container image.
	Image string `json:"image"`
	// JobSubjects are the JetStream subjects this component consumes.
	// +kubebuilder:validation:MinItems=1
	JobSubjects []string `json:"jobSubjects"`
	// InputMode declares how the component receives job input.
	InputMode InputMode `json:"inputMode"`
	// Egress is the network posture; drives the rendered NetworkPolicy.
	Egress EgressPosture `json:"egress"`
	// Allowlist is required when Egress is "allowlist", ignored otherwise.
	// +optional
	Allowlist *AllowlistEgress `json:"allowlist,omitempty"`
	// Config holds non-secret component-local config values, passed to the
	// worker as environment variables.
	// +optional
	Config map[string]string `json:"config,omitempty"`
	// SecretRefs reference Kubernetes Secrets wired into the worker pod.
	// +optional
	SecretRefs []SecretRef `json:"secretRefs,omitempty"`
	// Resources sets the worker pod CPU/memory limits (the cgroup caps).
	Resources corev1.ResourceRequirements `json:"resources"`
	// ScratchVolume optionally requests a writable emptyDir.
	// +optional
	ScratchVolume *ScratchVolume `json:"scratchVolume,omitempty"`
	// Scaling configures KEDA autoscaling.
	Scaling ScalingSpec `json:"scaling"`
}

TMIComponentSpec is the desired state of a component type.

func (*TMIComponentSpec) DeepCopy

func (in *TMIComponentSpec) DeepCopy() *TMIComponentSpec

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

func (*TMIComponentSpec) DeepCopyInto

func (in *TMIComponentSpec) DeepCopyInto(out *TMIComponentSpec)

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

type TMIComponentStatus

type TMIComponentStatus struct {
	// Conditions follows the standard Kubernetes condition pattern.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ObservedGeneration is the .metadata.generation last reconciled.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

TMIComponentStatus is the observed state.

func (*TMIComponentStatus) DeepCopy

func (in *TMIComponentStatus) DeepCopy() *TMIComponentStatus

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

func (*TMIComponentStatus) DeepCopyInto

func (in *TMIComponentStatus) DeepCopyInto(out *TMIComponentStatus)

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