Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the k8s.raptor.ml v1alpha1 API group +kubebuilder:object:generate=true +groupName=k8s.raptor.ml
Index ¶
- Variables
- type AggrFn
- type ConfigVar
- type DataSource
- func (in *DataSource) DeepCopy() *DataSource
- func (in *DataSource) DeepCopyInto(out *DataSource)
- func (in *DataSource) DeepCopyObject() runtime.Object
- func (in *DataSource) FQN() string
- func (in *DataSource) ParseConfig(ctx context.Context, rdr client.Reader) (ParsedConfig, error)
- func (in *DataSource) ResourceReference() ResourceReference
- type DataSourceList
- type DataSourceSpec
- type DataSourceStatus
- type Feature
- type FeatureBuilder
- type FeatureList
- type FeatureSpec
- type FeatureStatus
- type KeepPrevious
- type Model
- type ModelList
- type ModelServer
- type ModelSpec
- type ModelStatus
- type ParsedConfig
- type PrimitiveType
- type ResourceReference
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "k8s.raptor.ml", 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 AggrFn ¶
type AggrFn string
AggrFn 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 // +nullable Value string `json:"value,omitempty"` // Configuration value from secret // +optional // +nullable // +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 DataSource ¶
type DataSource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DataSourceSpec `json:"spec,omitempty"` Status DataSourceStatus `json:"status,omitempty"` }
DataSource is the Schema for the DataSource API
func (*DataSource) DeepCopy ¶
func (in *DataSource) DeepCopy() *DataSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSource.
func (*DataSource) DeepCopyInto ¶
func (in *DataSource) DeepCopyInto(out *DataSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DataSource) DeepCopyObject ¶
func (in *DataSource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DataSource) FQN ¶
func (in *DataSource) FQN() string
FQN returns the fully qualified name of the feature.
func (*DataSource) ParseConfig ¶
func (in *DataSource) 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 (*DataSource) ResourceReference ¶
func (in *DataSource) ResourceReference() ResourceReference
type DataSourceList ¶
type DataSourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DataSource `json:"items"` }
DataSourceList contains a list of DataSource
func (*DataSourceList) DeepCopy ¶
func (in *DataSourceList) DeepCopy() *DataSourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSourceList.
func (*DataSourceList) DeepCopyInto ¶
func (in *DataSourceList) DeepCopyInto(out *DataSourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DataSourceList) DeepCopyObject ¶
func (in *DataSourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DataSourceSpec ¶
type DataSourceSpec struct { // Kind of the DataSource // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Data Source Kind" Kind string `json:"kind"` // Config of the DataSource // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Config" Config []ConfigVar `json:"config"` // KeyFields are the fields that are used to identify the data source of a single data row. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Key Fields" KeyFields []string `json:"keyFields"` // TimestampField is the field that is used to identify the timestamp of a single data row. // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Timestamp Field" TimestampField string `json:"timestampField,omitempty"` // Resources defines the required resources for a single container(underlying implementation) of this DataSource. // Notice that this is not applicable for every DataSource, but only for those who implement an External Runner. // // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +optional // +nullable // +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 // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Replicas",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:podCount"} Replicas *int32 `json:"replicas,omitempty"` // Schema defines the schema of the data source. // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Schema" Schema json.RawMessage `json:"schema,omitempty"` }
DataSourceSpec defines the desired state of DataSource
func (*DataSourceSpec) DeepCopy ¶
func (in *DataSourceSpec) DeepCopy() *DataSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSourceSpec.
func (*DataSourceSpec) DeepCopyInto ¶
func (in *DataSourceSpec) DeepCopyInto(out *DataSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DataSourceStatus ¶
type DataSourceStatus struct { // Features includes a list of references for the Feature that uses this DataSource // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=status Features []ResourceReference `json:"features,omitempty"` // +operator-sdk:csv:customresourcedefinitions:type=status Replicas *int32 `json:"replicas,omitempty"` }
DataSourceStatus defines the observed state of DataSource
func (*DataSourceStatus) DeepCopy ¶
func (in *DataSourceStatus) DeepCopy() *DataSourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSourceStatus.
func (*DataSourceStatus) DeepCopyInto ¶
func (in *DataSourceStatus) DeepCopyInto(out *DataSourceStatus)
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 { // Kind defines the type of Builder to use to build the feature-value. // The kind is usually auto-detected from the data-source, but can be overridden. // +optional // +nullable Kind string `json:"kind,omitempty"` // 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. // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Aggregations" Aggr []AggrFn `json:"aggr,omitempty"` // AggrGranularity defines the granularity of the aggregation. // +optional // +nullable AggrGranularity metav1.Duration `json:"aggrGranularity,omitempty"` // Runtime defines the runtime virtualenv to use for running the python computation. // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="RuntimeManager" Runtime string `json:"runtime,omitempty"` // Packages defines the list of python packages to install in the runtime virtualenv. // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Packages" Packages []string `json:"packages,omitempty"` // Code defines a Python processing code to use to build the feature-value. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Python Expression" Code string `json:"code"` // Embedded custom configuration of the Builder to use to build the feature-value. // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless Raw json.RawMessage `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 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 FeatureSpec ¶
type FeatureSpec struct { // Primitive defines the type of the underlying feature-value that a Feature should respond with. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Primitive Type" Primitive PrimitiveType `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"` // KeepPrevious defines the number of previous values to keep in the history. // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Keep Previous" KeepPrevious *KeepPrevious `json:"keepPrevious,omitempty"` // Keys defines the list of keys that are required to calculate the feature value. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Keys" Keys []string `json:"keys"` // DataSource is a reference for the DataSource that this Feature is associated with // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Data Source" DataSource *ResourceReference `json:"dataSource,omitempty"` // Builder defines a building-block to use to build the feature-value // +kubebuilder:validation:Required // +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"` // State is the current state of the Feature Ready bool `json:"ready"` // Dependencies is the list of dependencies for the Feature // +optional // +nullable Dependencies []ResourceReference `json:"dependencies,omitempty"` }
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 KeepPrevious ¶
type KeepPrevious struct { // Versions defines the number of previous values to keep in the history. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Versions" Versions uint `json:"versions"` // Over defines the maximum time period to keep a previous values in the history since the last update. // You can specify `0` to keep the value until the next update. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Over" Over metav1.Duration `json:"over"` }
func (*KeepPrevious) DeepCopy ¶
func (in *KeepPrevious) DeepCopy() *KeepPrevious
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeepPrevious.
func (*KeepPrevious) DeepCopyInto ¶
func (in *KeepPrevious) DeepCopyInto(out *KeepPrevious)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Model ¶
type Model struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ModelSpec `json:"spec,omitempty"` Status ModelStatus `json:"status,omitempty"` }
Model is the Schema for the models API
func (*Model) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Model.
func (*Model) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Model) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Model) ParseInferenceConfig ¶
ParseInferenceConfig parses the inference config, and extracts the secrets, into a map of key-value pairs
type ModelList ¶
type ModelList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Model `json:"items"` }
ModelList contains a list of Model
func (*ModelList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelList.
func (*ModelList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ModelList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelServer ¶
type ModelServer string
ModelServer defines the backend inference server for the model. +kubebuilder:validation:Enum=sagemaker-ack
type ModelSpec ¶
type ModelSpec struct { // Freshness defines the age of a prediction-result(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 prediction-result(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 prediction. // +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 their timestamp. // If this is unset, the first feature in the list will be used. // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Key Feature FQN" KeyFeature string `json:"keyFeature,omitempty"` // Labels is a list of feature FQNs that are used to label the prediction result. // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Labels" Labels []string `json:"labels,omitempty"` // Keys defines the list of keys that are required to calculate the feature values. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Keys" Keys []string `json:"keys"` // ModelFramework is the framework used to train the model. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Model Framework" ModelFramework string `json:"modelFramework"` // ModelFrameworkVersion is the version of the framework used to train the model. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Model Framework Version" ModelFrameworkVersion string `json:"modelFrameworkVersion"` // StorageURI is the URI of the model storage. // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Storage URI" StorageURI string `json:"storageURI"` // ModelImage is the image used to serve the model. // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Model Image" ModelImage string `json:"modelImage"` // ModelServer is the server used to serve the model. // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Model Server" ModelServer ModelServer `json:"modelServer"` // InferenceConfig is the additional configuration used for the model server. // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Config" // +optional InferenceConfig []ConfigVar `json:"inferenceConfig"` // TrainingCode defines the code used to train the model. // +optional // +nullable // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Python Expression" TrainingCode string `json:"trainingCode"` }
ModelSpec defines the list of feature FQNs that are enabled for a given feature set
func (*ModelSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSpec.
func (*ModelSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelStatus ¶
type ModelStatus struct { // FQN is the Fully Qualified Name for the Model // +operator-sdk:csv:customresourcedefinitions:type=status FQN string `json:"fqn"` }
ModelStatus defines the observed state of Model
func (*ModelStatus) DeepCopy ¶
func (in *ModelStatus) DeepCopy() *ModelStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelStatus.
func (*ModelStatus) DeepCopyInto ¶
func (in *ModelStatus) DeepCopyInto(out *ModelStatus)
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) DeepCopy ¶
func (in ParsedConfig) DeepCopy() ParsedConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParsedConfig.
func (ParsedConfig) DeepCopyInto ¶
func (in ParsedConfig) DeepCopyInto(out *ParsedConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 PrimitiveType ¶
type PrimitiveType string
PrimitiveType defines the type of primitive +kubebuilder:validation:Enum=int;float;string;bool;timestamp;[]int;[]float;[]string;[]bool;[]timestamp
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 // +nullable // +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