Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the ols v1alpha1 API group +kubebuilder:object:generate=true +groupName=ols.openshift.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "ols.openshift.io", 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 CacheType ¶
type CacheType string
+kubebuilder:validation:Enum=redis
const (
Redis CacheType = "redis"
)
type ConversationCacheSpec ¶
type ConversationCacheSpec struct { // Conversation cache type. Default: "redis" // +kubebuilder:default=redis // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Cache Type" Type CacheType `json:"type,omitempty"` // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Redis" Redis RedisSpec `json:"redis,omitempty"` }
ConversationCacheSpec defines the desired state of OLS conversation cache.
func (*ConversationCacheSpec) DeepCopy ¶
func (in *ConversationCacheSpec) DeepCopy() *ConversationCacheSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversationCacheSpec.
func (*ConversationCacheSpec) DeepCopyInto ¶
func (in *ConversationCacheSpec) DeepCopyInto(out *ConversationCacheSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeploymentConfig ¶
type DeploymentConfig struct { // Defines the number of desired OLS pods. Default: "1" // +kubebuilder:default=1 // +kubebuilder:validation:Minimum=0 // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Number of replicas",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:podCount"} Replicas *int32 `json:"replicas,omitempty"` // The resource requirements for OLS instance. // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resource Requirements",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:resourceRequirements"} Resources *corev1.ResourceRequirements `json:"resources,omitempty"` }
DeploymentConfig defines the schema for overriding deployment of OLS instance.
func (*DeploymentConfig) DeepCopy ¶
func (in *DeploymentConfig) DeepCopy() *DeploymentConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentConfig.
func (*DeploymentConfig) DeepCopyInto ¶
func (in *DeploymentConfig) DeepCopyInto(out *DeploymentConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LLMSpec ¶
type LLMSpec struct { // +kubebuilder:validation:Required // +required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Providers" Providers []ProviderSpec `json:"providers"` }
LLMSpec defines the desired state of the large language model (LLM).
func (*LLMSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LLMSpec.
func (*LLMSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelSpec ¶
type ModelSpec struct { // Model name // +kubebuilder:validation:Required // +required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Name" Name string `json:"name"` // Model API URL // +kubebuilder:validation:Pattern=`^https?://.*$` // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="URL" URL string `json:"url,omitempty"` }
ModelSpec defines the desired state of cache.
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 OLSConfig ¶
type OLSConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // +kubebuilder:validation:Required // +required Spec OLSConfigSpec `json:"spec"` Status OLSConfigStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message=".metadata.name must be 'cluster'" Red Hat OpenShift LightSpeed instance. OLSConfig is the Schema for the olsconfigs API
func (*OLSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLSConfig.
func (*OLSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OLSConfig) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OLSConfigList ¶
type OLSConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []OLSConfig `json:"items"` }
+kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster OLSConfigList contains a list of OLSConfig
func (*OLSConfigList) DeepCopy ¶
func (in *OLSConfigList) DeepCopy() *OLSConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLSConfigList.
func (*OLSConfigList) DeepCopyInto ¶
func (in *OLSConfigList) DeepCopyInto(out *OLSConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OLSConfigList) DeepCopyObject ¶
func (in *OLSConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OLSConfigSpec ¶
type OLSConfigSpec struct { // +kubebuilder:validation:Required // +required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="LLM Settings" LLMConfig LLMSpec `json:"llm"` // +kubebuilder:validation:Required // +required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="OLS Settings" OLSConfig OLSSpec `json:"ols"` }
OLSConfigSpec defines the desired state of OLSConfig
func (*OLSConfigSpec) DeepCopy ¶
func (in *OLSConfigSpec) DeepCopy() *OLSConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLSConfigSpec.
func (*OLSConfigSpec) DeepCopyInto ¶
func (in *OLSConfigSpec) DeepCopyInto(out *OLSConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OLSConfigStatus ¶
type OLSConfigStatus struct { // +operator-sdk:csv:customresourcedefinitions:type=status Conditions []metav1.Condition `json:"conditions"` }
OLSConfigStatus defines the observed state of OLS deployment.
func (*OLSConfigStatus) DeepCopy ¶
func (in *OLSConfigStatus) DeepCopy() *OLSConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLSConfigStatus.
func (*OLSConfigStatus) DeepCopyInto ¶
func (in *OLSConfigStatus) DeepCopyInto(out *OLSConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OLSSpec ¶
type OLSSpec struct { // Conversation cache settings // +operator-sdk:csv:customresourcedefinitions:type=spec,order=2,displayName="Conversation Cache" ConversationCache ConversationCacheSpec `json:"conversationCache,omitempty"` // OLS deployment settings // +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Deployment" DeploymentConfig DeploymentConfig `json:"deployment,omitempty"` // Log level. Valid options are DEBUG, INFO, WARNING, ERROR and CRITICAL. Default: "INFO". // +kubebuilder:validation:Enum=DEBUG;INFO;WARNING;ERROR;CRITICAL // +kubebuilder:default=INFO // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Log level" LogLevel string `json:"logLevel,omitempty"` // Disable Authorization for OLS server. Default: "false" // +kubebuilder:default=false // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Disable Authorization",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"} DisableAuth bool `json:"disableAuth,omitempty"` // Default model for usage // +kubebuilder:validation:Required // +required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Default Model",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} DefaultModel string `json:"defaultModel"` // Default provider for usage // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Default Provider",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} DefaultProvider string `json:"defaultProvider,omitempty"` // Classifier provider name // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Classifier Provider",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} ClassifierProvider string `json:"classifierProvider,omitempty"` // Classifier model name // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Classifier Model",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} ClassifierModel string `json:"classifierModel,omitempty"` // Summarizer provider name // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Summarizer Provider",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} SummarizerProvider string `json:"summarizerProvider,omitempty"` // Summarizer model name // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Summarizer Model",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} SummarizerModel string `json:"summarizerModel,omitempty"` // Validator provider name // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Validator Provider",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} ValidatorProvider string `json:"validatorProvider,omitempty"` // Validator model name // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Validator Model",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} ValidatorModel string `json:"validatorModel,omitempty"` // YAML provider name // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="YAML Provider",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} YamlProvider string `json:"yamlProvider,omitempty"` // YAML model name // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="YAML Model",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"} YamlModel string `json:"yamlModel,omitempty"` // Query filters // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Query Filters" QueryFilters []QueryFiltersSpec `json:"queryFilters,omitempty"` }
OLSSpec defines the desired state of OLS deployment.
func (*OLSSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLSSpec.
func (*OLSSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProviderSpec ¶
type ProviderSpec struct { // Provider name // +kubebuilder:validation:Required // +required // +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Name" Name string `json:"name,omitempty"` // Provider API URL // +kubebuilder:validation:Pattern=`^https?://.*$` // +operator-sdk:csv:customresourcedefinitions:type=spec,order=2,displayName="URL" URL string `json:"url,omitempty"` // The name of the secret object that stores API provider credentials // +kubebuilder:validation:Required // +required // +operator-sdk:csv:customresourcedefinitions:type=spec,order=3,displayName="Credential Secret" CredentialsSecretRef corev1.LocalObjectReference `json:"credentialsSecretRef,omitempty"` // List of models from the provider // +kubebuilder:validation:Required // +required // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Models" Models []ModelSpec `json:"models,omitempty"` // Provider type // +kubebuilder:validation:Required // +required // +kubebuilder:validation:Enum=azure_openai;bam;openai;watsonx // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Provider Type" Type string `json:"type"` // Azure OpenAI deployment name // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Azure OpenAI deployment name" AzureDeploymentName string `json:"deploymentName,omitempty"` // Watsonx Project ID // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Watsonx Project ID" WatsonProjectID string `json:"projectID,omitempty"` }
ProviderSpec defines the desired state of LLM provider. +kubebuilder:validation:XValidation:message="'deploymentName' must be specified for 'azure_openai' provider",rule="self.type != \"azure_openai\" || self.deploymentName != \"\"" +kubebuilder:validation:XValidation:message="'projectID' must be specified for 'watsonx' provider",rule="self.type != \"watsonx\" || self.projectID != \"\""
func (*ProviderSpec) DeepCopy ¶
func (in *ProviderSpec) DeepCopy() *ProviderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderSpec.
func (*ProviderSpec) DeepCopyInto ¶
func (in *ProviderSpec) DeepCopyInto(out *ProviderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QueryFiltersSpec ¶
type QueryFiltersSpec struct { // Filter name. // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Filter Name" Name string `json:"name,omitempty"` // Filter pattern. // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="The pattern to replace" Pattern string `json:"pattern,omitempty"` // Replacement for the matched pattern. // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Replace With" ReplaceWith string `json:"replaceWith,omitempty"` }
QueryFiltersSpec defines filters to manipulate questions/queries.
func (*QueryFiltersSpec) DeepCopy ¶
func (in *QueryFiltersSpec) DeepCopy() *QueryFiltersSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryFiltersSpec.
func (*QueryFiltersSpec) DeepCopyInto ¶
func (in *QueryFiltersSpec) DeepCopyInto(out *QueryFiltersSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisSpec ¶
type RedisSpec struct { // Secret that holds redis credentials // +kubebuilder:default="lightspeed-redis-secret" // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Credentials secret" CredentialsSecret string `json:"credentialsSecret,omitempty"` // Redis maxmemory // +kubebuilder:validation:XIntOrString // +kubebuilder:default="1024mb" // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Max Memory" MaxMemory *intstr.IntOrString `json:"maxMemory,omitempty"` // Redis maxmemory policy. Default: "allkeys-lru" // +kubebuilder:default=allkeys-lru // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Max Memory Policy" MaxMemoryPolicy string `json:"maxMemoryPolicy,omitempty"` }
RedisSpec defines the desired state of Redis.
func (*RedisSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSpec.
func (*RedisSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.