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 ¶
var AddToScheme = SchemeBuilder.AddToScheme
AddToScheme adds the types in this group/version to a scheme.
var GroupVersion = schema.GroupVersion{Group: "tmi.dev", Version: "v1alpha1"}
GroupVersion is the group/version for the TMI Component Platform API.
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. SEM@63e2aad01818e6abee8652287d395a8b4f205986: data container declaring allowed egress targets for a component with allowlist network posture (pure)
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. SEM@63e2aad01818e6abee8652287d395a8b4f205986: data container selecting an in-cluster egress destination by namespace and pod labels (pure)
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 SEM@903a46db5bf7674feed65c5c638d24d77f8bf47c: enum type controlling the network egress policy rendered for a worker component (pure)
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 SEM@903a46db5bf7674feed65c5c638d24d77f8bf47c: enum type declaring how a worker component receives job input (pure)
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. SEM@903a46db5bf7674feed65c5c638d24d77f8bf47c: data container configuring KEDA autoscaling bounds and queue-depth target for a component (pure)
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. SEM@903a46db5bf7674feed65c5c638d24d77f8bf47c: data container declaring a capped ephemeral emptyDir volume for a worker pod (pure)
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. SEM@903a46db5bf7674feed65c5c638d24d77f8bf47c: data container referencing a key in a Kubernetes Secret by name without inlining secrets (pure)
func (*SecretRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.
func (*SecretRef) DeepCopyInto ¶
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. SEM@903a46db5bf7674feed65c5c638d24d77f8bf47c: Kubernetes custom resource declaring a TMI Component Platform worker type (pure)
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. SEM@903a46db5bf7674feed65c5c638d24d77f8bf47c: list container for TMIComponent custom resources (pure)
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. SEM@903a46db5bf7674feed65c5c638d24d77f8bf47c: desired-state spec for a TMI worker component type including image, scaling, and network policy (pure)
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. SEM@903a46db5bf7674feed65c5c638d24d77f8bf47c: observed-state status for a TMI worker component with Kubernetes conditions (pure)
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.