Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the k8s.natun.ai v1alpha1 API group +kubebuilder:object:generate=true +groupName=k8s.natun.ai
Index ¶
- Variables
- type AggrType
- type ConfigVar
- type DataConnector
- func (in *DataConnector) DeepCopy() *DataConnector
- func (in *DataConnector) DeepCopyInto(out *DataConnector)
- func (in *DataConnector) DeepCopyObject() runtime.Object
- func (in *DataConnector) FQN() string
- func (in *DataConnector) ParseConfig(ctx context.Context, rdr client.Reader) (ParsedConfig, error)
- func (in *DataConnector) ResourceReference() ResourceReference
- type DataConnectorList
- type DataConnectorSpec
- type DataConnectorStatus
- type Feature
- type FeatureBuilder
- type FeatureBuilderKind
- type FeatureList
- type FeatureSet
- type FeatureSetList
- type FeatureSetSpec
- type FeatureSetStatus
- type FeatureSpec
- type FeatureStatus
- type ParsedConfig
- type ResourceReference
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "k8s.natun.ai", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type AggrType ¶
type AggrType string
AggrType defines the type of aggregation +kubebuilder:validation:Enum=count;min;max;sum;avg;mean
type ConfigVar ¶
type ConfigVar struct { // Configuration name Name string `json:"name"` // Configuration value // +optional Value string `json:"value,omitempty"` // Configuration value from secret // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:io.kubernetes:Secret"} SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"` }
ConfigVar is a name/value pair for the config.
func (*ConfigVar) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigVar.
func (*ConfigVar) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DataConnector ¶
type DataConnector struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DataConnectorSpec `json:"spec,omitempty"` Status DataConnectorStatus `json:"status,omitempty"` }
DataConnector is the Schema for the dataconnectors API
func (*DataConnector) DeepCopy ¶
func (in *DataConnector) DeepCopy() *DataConnector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataConnector.
func (*DataConnector) DeepCopyInto ¶
func (in *DataConnector) DeepCopyInto(out *DataConnector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DataConnector) DeepCopyObject ¶
func (in *DataConnector) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DataConnector) FQN ¶
func (in *DataConnector) FQN() string
FQN returns the fully qualified name of the feature.
func (*DataConnector) ParseConfig ¶
func (in *DataConnector) ParseConfig(ctx context.Context, rdr client.Reader) (ParsedConfig, error)
ParseConfig parses the config, and extracts the secrets, into a map of key-value pairs
func (*DataConnector) ResourceReference ¶
func (in *DataConnector) ResourceReference() ResourceReference
type DataConnectorList ¶
type DataConnectorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DataConnector `json:"items"` }
DataConnectorList contains a list of DataConnector
func (*DataConnectorList) DeepCopy ¶
func (in *DataConnectorList) DeepCopy() *DataConnectorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataConnectorList.
func (*DataConnectorList) DeepCopyInto ¶
func (in *DataConnectorList) DeepCopyInto(out *DataConnectorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DataConnectorList) DeepCopyObject ¶
func (in *DataConnectorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DataConnectorSpec ¶
type DataConnectorSpec struct { // Kind of the DataConnector // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Connector Kind" Kind string `json:"kind"` // Config of the DataConnector // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Config" Config []ConfigVar `json:"config"` // Resources defines the required resources for a single container(underlying implementation) of this DataConnector. // Notice that this is not applicable for every DataConnector, but only for those who implement an External Runner. // // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resources",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:resourceRequirements"} Resources corev1.ResourceRequirements `json:"resources,omitempty"` // Replicas defines the number of desired pods. This is a pointer to distinguish between explicit // zero and not specified. Defaults to 1. // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Replicas",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:podCount"} Replicas *int32 `json:"replicas,omitempty"` }
DataConnectorSpec defines the desired state of DataConnector
func (*DataConnectorSpec) DeepCopy ¶
func (in *DataConnectorSpec) DeepCopy() *DataConnectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataConnectorSpec.
func (*DataConnectorSpec) DeepCopyInto ¶
func (in *DataConnectorSpec) DeepCopyInto(out *DataConnectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DataConnectorStatus ¶
type DataConnectorStatus struct { // Features includes a list of references for the Feature that uses this DataConnector // +operator-sdk:csv:customresourcedefinitions:type=status Features []ResourceReference `json:"features"` // +operator-sdk:csv:customresourcedefinitions:type=status Replicas int32 `json:"replicas,omitempty"` }
DataConnectorStatus defines the observed state of DataConnector
func (*DataConnectorStatus) DeepCopy ¶
func (in *DataConnectorStatus) DeepCopy() *DataConnectorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataConnectorStatus.
func (*DataConnectorStatus) DeepCopyInto ¶
func (in *DataConnectorStatus) DeepCopyInto(out *DataConnectorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Feature ¶
type Feature struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FeatureSpec `json:"spec,omitempty"` Status FeatureStatus `json:"status,omitempty"` }
Feature is the Schema for the features API
func (*Feature) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature.
func (*Feature) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Feature) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Feature) ResourceReference ¶
func (in *Feature) ResourceReference() ResourceReference
type FeatureBuilder ¶
type FeatureBuilder struct { FeatureBuilderKind `json:",inline"` // Embedded custom configuration of the Builder to use to build the feature-value. // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless apiextensions.JSON `json:",inline"` }
FeatureBuilder defines a building-block to use to build the feature-value
func (*FeatureBuilder) DeepCopy ¶
func (in *FeatureBuilder) DeepCopy() *FeatureBuilder
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureBuilder.
func (*FeatureBuilder) DeepCopyInto ¶
func (in *FeatureBuilder) DeepCopyInto(out *FeatureBuilder)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FeatureBuilderKind ¶
type FeatureBuilderKind struct { // Kind defines the type of Builder to use to build the feature-value. Kind string `json:"kind"` }
FeatureBuilderKind select the building-block to use to build the feature-value
func (*FeatureBuilderKind) DeepCopy ¶
func (in *FeatureBuilderKind) DeepCopy() *FeatureBuilderKind
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureBuilderKind.
func (*FeatureBuilderKind) DeepCopyInto ¶
func (in *FeatureBuilderKind) DeepCopyInto(out *FeatureBuilderKind)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FeatureList ¶
type FeatureList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Feature `json:"items"` }
FeatureList contains a list of Feature
func (*FeatureList) DeepCopy ¶
func (in *FeatureList) DeepCopy() *FeatureList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList.
func (*FeatureList) DeepCopyInto ¶
func (in *FeatureList) DeepCopyInto(out *FeatureList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FeatureList) DeepCopyObject ¶
func (in *FeatureList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FeatureSet ¶
type FeatureSet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FeatureSetSpec `json:"spec,omitempty"` Status FeatureSetStatus `json:"status,omitempty"` }
FeatureSet is the Schema for the featuresets API
func (*FeatureSet) DeepCopy ¶
func (in *FeatureSet) DeepCopy() *FeatureSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSet.
func (*FeatureSet) DeepCopyInto ¶
func (in *FeatureSet) DeepCopyInto(out *FeatureSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FeatureSet) DeepCopyObject ¶
func (in *FeatureSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*FeatureSet) FQN ¶
func (in *FeatureSet) FQN() string
FQN returns the fully qualified name of the feature.
type FeatureSetList ¶
type FeatureSetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []FeatureSet `json:"items"` }
FeatureSetList contains a list of FeatureSet
func (*FeatureSetList) DeepCopy ¶
func (in *FeatureSetList) DeepCopy() *FeatureSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSetList.
func (*FeatureSetList) DeepCopyInto ¶
func (in *FeatureSetList) DeepCopyInto(out *FeatureSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FeatureSetList) DeepCopyObject ¶
func (in *FeatureSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FeatureSetSpec ¶
type FeatureSetSpec struct { // Timeout defines the maximum ingestion time allowed to calculate the feature value. // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Timeout" Timeout metav1.Duration `json:"timeout"` // Features is the list of feature FQNs that are enabled for a given feature set // +kubebuilder:validation:MinItems=2 // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Features" Features []string `json:"features"` // KeyFeature is the feature FQN that is used to align the rest of the features with it timestamp. // If this is unset, the first feature in the list will be used. // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Key Feature FQN" KeyFeature string `json:"keyFeature,omitempty"` }
FeatureSetSpec defines the list of feature FQNs that are enabled for a given feature set
func (*FeatureSetSpec) DeepCopy ¶
func (in *FeatureSetSpec) DeepCopy() *FeatureSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSetSpec.
func (*FeatureSetSpec) DeepCopyInto ¶
func (in *FeatureSetSpec) DeepCopyInto(out *FeatureSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FeatureSetStatus ¶
type FeatureSetStatus struct { // FQN is the Fully Qualified Name for the FeatureSet // +operator-sdk:csv:customresourcedefinitions:type=status FQN string `json:"fqn"` }
FeatureSetStatus defines the observed state of FeatureSet
func (*FeatureSetStatus) DeepCopy ¶
func (in *FeatureSetStatus) DeepCopy() *FeatureSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSetStatus.
func (*FeatureSetStatus) DeepCopyInto ¶
func (in *FeatureSetStatus) DeepCopyInto(out *FeatureSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FeatureSpec ¶
type FeatureSpec struct { // Primitive defines the type of the underlying feature-value that a Feature should respond with // Valid values are: // - `int` // - `float` // - `string` // - `timestamp // - `[]int` // - `[]float` // - `[]string` // - `[]timestamp` // - `headless` // +kubebuilder:validation:Required // +kubebuilder:validation:Enum=int;float;string;timestamp;[]int;[]float;[]string;[]timestamp;headless // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Primitive Type" Primitive string `json:"primitive"` // Freshness defines the age of a feature-value(time since the value has set) to consider as *fresh*. // Fresh values doesn't require re-ingestion // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Freshness" Freshness metav1.Duration `json:"freshness"` // Staleness defines the age of a feature-value(time since the value has set) to consider as *stale*. // Stale values are not fit for usage, therefore will not be returned and will REQUIRE re-ingestion. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Staleness" Staleness metav1.Duration `json:"staleness"` // Timeout defines the maximum ingestion time allowed to calculate the feature value. // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Timeout" Timeout metav1.Duration `json:"timeout"` // Aggr defines an aggregation on top of the underlying feature-value. Aggregations will be calculated on time-of-request. // Users can specify here multiple functions to calculate the aggregation. // Valid values: // - `count` // - `min` // - `mix` // - `sum“ // - `mean` (alias for `avg`) // - `avg` // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Aggregations" Aggr []AggrType `json:"aggr"` // DataConnector is a reference for the DataConnector that this Feature is associated with // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Data Connector" DataConnector *ResourceReference `json:"connector,omitempty"` // Builder defines a building-block to use to build the feature-value // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Builder" Builder FeatureBuilder `json:"builder"` }
FeatureSpec defines the desired state of Feature
func (*FeatureSpec) DeepCopy ¶
func (in *FeatureSpec) DeepCopy() *FeatureSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSpec.
func (*FeatureSpec) DeepCopyInto ¶
func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FeatureStatus ¶
type FeatureStatus struct { // FQN is the Fully Qualified Name for the Feature // +operator-sdk:csv:customresourcedefinitions:type=status FQN string `json:"fqn"` }
FeatureStatus defines the observed state of Feature
func (*FeatureStatus) DeepCopy ¶
func (in *FeatureStatus) DeepCopy() *FeatureStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureStatus.
func (*FeatureStatus) DeepCopyInto ¶
func (in *FeatureStatus) DeepCopyInto(out *FeatureStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParsedConfig ¶
ParsedConfig is a parsed configuration
func (*ParsedConfig) Unmarshal ¶
func (cfg *ParsedConfig) Unmarshal(output any) error
Unmarshal is unmarshalling the config into a Struct. Make sure that the tags on the fields of the structure are properly set using the `mapstructure` tag.
type ResourceReference ¶
type ResourceReference struct { // Name is unique within a namespace to reference a resource. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resource's Name" Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // Namespace defines the space within which the resource name must be unique. // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resource's Namespace" Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` }
ResourceReference represents a resource reference. It has enough information to retrieve resource in any namespace. +structType=atomic
func (*ResourceReference) DeepCopy ¶
func (in *ResourceReference) DeepCopy() *ResourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceReference.
func (*ResourceReference) DeepCopyInto ¶
func (in *ResourceReference) DeepCopyInto(out *ResourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceReference) FQN ¶
func (in *ResourceReference) FQN() string
func (*ResourceReference) ObjectKey ¶
func (in *ResourceReference) ObjectKey() client.ObjectKey
ObjectKey is a helper function to get a client.ObjectKey from an ObjectReference