Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyDefaultsToStatus(cr *feastdevv1.FeatureStore)
- func CopyMap(original map[string]interface{}) map[string]interface{}
- func GetFeastName(featureStore *feastdevv1.FeatureStore) string
- func GetFeastServiceName(featureStore *feastdevv1.FeatureStore, feastType FeastServiceType) string
- func GetOfflineContainer(deployment appsv1.Deployment) *corev1.Container
- func GetOfflineVolume(featureStore *feastdevv1.FeatureStore, volumes []corev1.Volume) *corev1.Volume
- func GetOfflineVolumeMount(featureStore *feastdevv1.FeatureStore, volumeMounts []corev1.VolumeMount) *corev1.VolumeMount
- func GetOnlineContainer(deployment appsv1.Deployment) *corev1.Container
- func GetOnlineVolume(featureStore *feastdevv1.FeatureStore, volumes []corev1.Volume) *corev1.Volume
- func GetOnlineVolumeMount(featureStore *feastdevv1.FeatureStore, volumeMounts []corev1.VolumeMount) *corev1.VolumeMount
- func GetRegistryContainer(deployment appsv1.Deployment) *corev1.Container
- func GetRegistryVolume(featureStore *feastdevv1.FeatureStore, volumes []corev1.Volume) *corev1.Volume
- func GetRegistryVolumeMount(featureStore *feastdevv1.FeatureStore, volumeMounts []corev1.VolumeMount) *corev1.VolumeMount
- func GetTlsPath(feastType FeastServiceType) string
- func GetUIContainer(deployment appsv1.Deployment) *corev1.Container
- func HasServiceMonitorCRD() bool
- func IsDeploymentAvailable(conditions []appsv1.DeploymentCondition) bool
- func IsLocalRegistry(featureStore *feastdevv1.FeatureStore) bool
- func IsOpenShift() bool
- func IsRegistryServer(featureStore *feastdevv1.FeatureStore) bool
- func SetIsOpenShift(cfg *rest.Config)
- type AuthzConfig
- type AuthzType
- type ComputeEngineConfig
- type CustomCertificatesBundle
- type FeastProviderType
- type FeastServiceType
- type FeastServices
- func (feast *FeastServices) AddToNamespaceRegistry() error
- func (feast *FeastServices) ApplyDefaults() error
- func (feast *FeastServices) Deploy() error
- func (feast *FeastServices) GetCustomCertificatesBundle() CustomCertificatesBundle
- func (feast *FeastServices) GetDefaultRepoConfig() RepoConfig
- func (feast *FeastServices) GetDeployment() (appsv1.Deployment, error)
- func (feast *FeastServices) GetFeastRestServiceName(feastType FeastServiceType) string
- func (feast *FeastServices) GetFeastServiceName(feastType FeastServiceType) string
- func (feast *FeastServices) GetInitRepoConfig() RepoConfig
- func (feast *FeastServices) GetObjectMeta() metav1.ObjectMeta
- func (feast *FeastServices) GetObjectMetaType(feastType FeastServiceType) metav1.ObjectMeta
- func (feast *FeastServices) GetPodContainerFailureMessage(deploy appsv1.Deployment) string
- func (feast *FeastServices) GetServiceFeatureStoreYamlBase64() (string, error)
- func (feast *FeastServices) IsRemoteRefRegistry() bool
- func (feast *FeastServices) RemoveFromNamespaceRegistry() error
- type FeatureServerYamlConfig
- type MaterializationYamlConfig
- type MetricsYamlConfig
- type NamespaceRegistryData
- type OfflineConfigType
- type OfflineStoreConfig
- type OidcPropertyType
- type OnlineConfigType
- type OnlineStoreConfig
- type OpenLineageYamlConfig
- type RegistryConfig
- type RegistryConfigType
- type RepoConfig
Constants ¶
const ( TmpFeatureStoreYamlEnvVar = "TMP_FEATURE_STORE_YAML_BASE64" FeatureStoreYamlCmKey = "feature_store.yaml" EphemeralPath = "/feast-data" FeatureRepoDir = "feature_repo" DefaultRegistryPath = "registry.db" DefaultOnlineStorePath = "online_store.db" // Namespace registry ConfigMap constants NamespaceRegistryConfigMapName = "feast-configs-registry" NamespaceRegistryDataKey = "namespaces" DefaultKubernetesNamespace = "feast-operator-system" HttpPort = 80 HttpsPort = 443 HttpScheme = "http" HttpsScheme = "https" DefaultOfflineStorageRequest = "20Gi" DefaultOnlineStorageRequest = "5Gi" DefaultRegistryStorageRequest = "5Gi" MetricsPort int32 = 8000 AuthzFeastType FeastServiceType = "authorization" OfflineFeastType FeastServiceType = "offline" OnlineFeastType FeastServiceType = "online" RegistryFeastType FeastServiceType = "registry" UIFeastType FeastServiceType = "ui" ClientFeastType FeastServiceType = "client" ClientCaFeastType FeastServiceType = "client-ca" CronJobFeastType FeastServiceType = "cronjob" OfflineRemoteConfigType OfflineConfigType = "remote" OfflineFilePersistenceDaskConfigType OfflineConfigType = "dask" OfflineFilePersistenceDuckDbConfigType OfflineConfigType = "duckdb" OfflineDBPersistenceSnowflakeConfigType OfflineConfigType = "snowflake.offline" OnlineRemoteConfigType OnlineConfigType = "remote" OnlineSqliteConfigType OnlineConfigType = "sqlite" OnlineDBPersistenceSnowflakeConfigType OnlineConfigType = "snowflake.online" OnlineDBPersistenceCassandraConfigType OnlineConfigType = "cassandra" RegistryRemoteConfigType RegistryConfigType = "remote" RegistryFileConfigType RegistryConfigType = "file" RegistryDBPersistenceSnowflakeConfigType RegistryConfigType = "snowflake.registry" RegistryDBPersistenceSQLConfigType RegistryConfigType = "sql" LocalProviderType FeastProviderType = "local" NoAuthAuthType AuthzType = "no_auth" KubernetesAuthType AuthzType = "kubernetes" OidcAuthType AuthzType = "oidc" OidcClientId OidcPropertyType = "client_id" OidcAuthDiscoveryUrl OidcPropertyType = "auth_discovery_url" OidcClientSecret OidcPropertyType = "client_secret" OidcUsername OidcPropertyType = "username" OidcPassword OidcPropertyType = "password" OidcTokenEnvVar OidcPropertyType = "token_env_var" OidcVerifySsl OidcPropertyType = "verify_ssl" OidcCaCertPath OidcPropertyType = "ca_cert_path" OidcMissingSecretError string = "missing OIDC secret: %s" )
const ( ManagedByLabelKey = "app.kubernetes.io/managed-by" ManagedByLabelValue = "feast-operator" )
Variables ¶
var ( DefaultImage = "quay.io/feastdev/feature-server:" + feastversion.FeastVersion DefaultCronJobImage = "quay.io/openshift/origin-cli:4.17" DefaultPVCAccessModes = []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce} NameLabelKey = feastdevv1.GroupVersion.Group + "/name" ServiceTypeLabelKey = feastdevv1.GroupVersion.Group + "/service-type" FeastServiceConstants = map[FeastServiceType]deploymentSettings{ OfflineFeastType: { Args: []string{"serve_offline", "-h", "0.0.0.0"}, TargetHttpPort: 8815, TargetHttpsPort: 8816, }, OnlineFeastType: { Args: []string{"serve", "-h", "0.0.0.0"}, TargetHttpPort: 6566, TargetHttpsPort: 6567, }, RegistryFeastType: { Args: []string{"serve_registry"}, TargetHttpPort: 6570, TargetHttpsPort: 6571, TargetRestHttpPort: 6572, TargetRestHttpsPort: 6573, }, UIFeastType: { Args: []string{"ui", "-h", "0.0.0.0"}, TargetHttpPort: 8888, TargetHttpsPort: 8443, }, } FeastServiceConditions = map[FeastServiceType]map[metav1.ConditionStatus]metav1.Condition{ OfflineFeastType: { metav1.ConditionTrue: { Type: feastdevv1.OfflineStoreReadyType, Status: metav1.ConditionTrue, Reason: feastdevv1.ReadyReason, Message: feastdevv1.OfflineStoreReadyMessage, }, metav1.ConditionFalse: { Type: feastdevv1.OfflineStoreReadyType, Status: metav1.ConditionFalse, Reason: feastdevv1.OfflineStoreFailedReason, }, }, OnlineFeastType: { metav1.ConditionTrue: { Type: feastdevv1.OnlineStoreReadyType, Status: metav1.ConditionTrue, Reason: feastdevv1.ReadyReason, Message: feastdevv1.OnlineStoreReadyMessage, }, metav1.ConditionFalse: { Type: feastdevv1.OnlineStoreReadyType, Status: metav1.ConditionFalse, Reason: feastdevv1.OnlineStoreFailedReason, }, }, RegistryFeastType: { metav1.ConditionTrue: { Type: feastdevv1.RegistryReadyType, Status: metav1.ConditionTrue, Reason: feastdevv1.ReadyReason, Message: feastdevv1.RegistryReadyMessage, }, metav1.ConditionFalse: { Type: feastdevv1.RegistryReadyType, Status: metav1.ConditionFalse, Reason: feastdevv1.RegistryFailedReason, }, }, UIFeastType: { metav1.ConditionTrue: { Type: feastdevv1.UIReadyType, Status: metav1.ConditionTrue, Reason: feastdevv1.ReadyReason, Message: feastdevv1.UIReadyMessage, }, metav1.ConditionFalse: { Type: feastdevv1.UIReadyType, Status: metav1.ConditionFalse, Reason: feastdevv1.UIFailedReason, }, }, ClientFeastType: { metav1.ConditionTrue: { Type: feastdevv1.ClientReadyType, Status: metav1.ConditionTrue, Reason: feastdevv1.ReadyReason, Message: feastdevv1.ClientReadyMessage, }, metav1.ConditionFalse: { Type: feastdevv1.ClientReadyType, Status: metav1.ConditionFalse, Reason: feastdevv1.ClientFailedReason, }, }, CronJobFeastType: { metav1.ConditionTrue: { Type: feastdevv1.CronJobReadyType, Status: metav1.ConditionTrue, Reason: feastdevv1.ReadyReason, Message: feastdevv1.CronJobReadyMessage, }, metav1.ConditionFalse: { Type: feastdevv1.CronJobReadyType, Status: metav1.ConditionFalse, Reason: feastdevv1.CronJobFailedReason, }, }, } OidcOptionalSecretProperties = []OidcPropertyType{OidcAuthDiscoveryUrl, OidcClientId, OidcClientSecret, OidcUsername, OidcPassword} )
Functions ¶
func ApplyDefaultsToStatus ¶
func ApplyDefaultsToStatus(cr *feastdevv1.FeatureStore)
func GetFeastName ¶
func GetFeastName(featureStore *feastdevv1.FeatureStore) string
func GetFeastServiceName ¶
func GetFeastServiceName(featureStore *feastdevv1.FeatureStore, feastType FeastServiceType) string
GetFeastServiceName returns the feast service object name based on service type
func GetOfflineContainer ¶
func GetOfflineContainer(deployment appsv1.Deployment) *corev1.Container
func GetOfflineVolume ¶
func GetOfflineVolume(featureStore *feastdevv1.FeatureStore, volumes []corev1.Volume) *corev1.Volume
func GetOfflineVolumeMount ¶
func GetOfflineVolumeMount(featureStore *feastdevv1.FeatureStore, volumeMounts []corev1.VolumeMount) *corev1.VolumeMount
func GetOnlineContainer ¶
func GetOnlineContainer(deployment appsv1.Deployment) *corev1.Container
func GetOnlineVolume ¶
func GetOnlineVolume(featureStore *feastdevv1.FeatureStore, volumes []corev1.Volume) *corev1.Volume
func GetOnlineVolumeMount ¶
func GetOnlineVolumeMount(featureStore *feastdevv1.FeatureStore, volumeMounts []corev1.VolumeMount) *corev1.VolumeMount
func GetRegistryContainer ¶
func GetRegistryContainer(deployment appsv1.Deployment) *corev1.Container
func GetRegistryVolume ¶
func GetRegistryVolume(featureStore *feastdevv1.FeatureStore, volumes []corev1.Volume) *corev1.Volume
func GetRegistryVolumeMount ¶
func GetRegistryVolumeMount(featureStore *feastdevv1.FeatureStore, volumeMounts []corev1.VolumeMount) *corev1.VolumeMount
func GetTlsPath ¶
func GetTlsPath(feastType FeastServiceType) string
func GetUIContainer ¶
func GetUIContainer(deployment appsv1.Deployment) *corev1.Container
func HasServiceMonitorCRD ¶
func HasServiceMonitorCRD() bool
HasServiceMonitorCRD returns whether the monitoring.coreos.com API group (Prometheus Operator) is available in the cluster.
func IsDeploymentAvailable ¶
func IsDeploymentAvailable(conditions []appsv1.DeploymentCondition) bool
func IsLocalRegistry ¶
func IsLocalRegistry(featureStore *feastdevv1.FeatureStore) bool
func IsOpenShift ¶
func IsOpenShift() bool
IsOpenShift is a global flag that can be safely called across reconciliation cycles, defined at the controller manager start.
func IsRegistryServer ¶
func IsRegistryServer(featureStore *feastdevv1.FeatureStore) bool
func SetIsOpenShift ¶
SetIsOpenShift sets the global flag isOpenShift by the controller manager. We don't need to keep fetching the API every reconciliation cycle that we need to know about the platform.
Types ¶
type AuthzConfig ¶
type AuthzConfig struct {
Type AuthzType `yaml:"type,omitempty"`
OidcParameters map[string]interface{} `yaml:",inline,omitempty"`
}
AuthzConfig is the RBAC authorization configuration.
type ComputeEngineConfig ¶
type ComputeEngineConfig struct {
Type string `yaml:"type,omitempty"`
Parameters map[string]interface{} `yaml:",inline,omitempty"`
}
ComputeEngineConfig is the configuration for batch compute engine.
type CustomCertificatesBundle ¶
CustomCertificatesBundle represents a custom CA bundle configuration
type FeastProviderType ¶
type FeastProviderType string
FeastProviderType defines an implementation of a feature store object
type FeastServices ¶
type FeastServices struct {
Handler handler.FeastHandler
}
FeastServices is an interface for configuring and deploying feast services
func (*FeastServices) AddToNamespaceRegistry ¶
func (feast *FeastServices) AddToNamespaceRegistry() error
AddToNamespaceRegistry adds a feature store instance to the namespace registry
func (*FeastServices) ApplyDefaults ¶
func (feast *FeastServices) ApplyDefaults() error
Apply defaults and set service hostnames in FeatureStore status
func (*FeastServices) GetCustomCertificatesBundle ¶
func (feast *FeastServices) GetCustomCertificatesBundle() CustomCertificatesBundle
GetCustomCertificatesBundle retrieves the custom CA bundle ConfigMap if it exists when deployed with RHOAI or ODH
func (*FeastServices) GetDefaultRepoConfig ¶
func (feast *FeastServices) GetDefaultRepoConfig() RepoConfig
func (*FeastServices) GetDeployment ¶
func (feast *FeastServices) GetDeployment() (appsv1.Deployment, error)
func (*FeastServices) GetFeastRestServiceName ¶
func (feast *FeastServices) GetFeastRestServiceName(feastType FeastServiceType) string
GetFeastRestServiceName returns the feast REST service object name based on service type
func (*FeastServices) GetFeastServiceName ¶
func (feast *FeastServices) GetFeastServiceName(feastType FeastServiceType) string
func (*FeastServices) GetInitRepoConfig ¶
func (feast *FeastServices) GetInitRepoConfig() RepoConfig
func (*FeastServices) GetObjectMeta ¶
func (feast *FeastServices) GetObjectMeta() metav1.ObjectMeta
GetObjectMeta returns the feast k8s object metadata with type
func (*FeastServices) GetObjectMetaType ¶
func (feast *FeastServices) GetObjectMetaType(feastType FeastServiceType) metav1.ObjectMeta
GetObjectMeta returns the feast k8s object metadata with type
func (*FeastServices) GetPodContainerFailureMessage ¶
func (feast *FeastServices) GetPodContainerFailureMessage(deploy appsv1.Deployment) string
GetPodContainerFailureMessage inspects pods belonging to the given deployment and returns a human-readable message describing the first init or regular container that is in a failing state. Returns empty string if no failure found.
func (*FeastServices) GetServiceFeatureStoreYamlBase64 ¶
func (feast *FeastServices) GetServiceFeatureStoreYamlBase64() (string, error)
GetServiceFeatureStoreYamlBase64 returns a base64 encoded feature_store.yaml config for the feast service
func (*FeastServices) IsRemoteRefRegistry ¶
func (feast *FeastServices) IsRemoteRefRegistry() bool
func (*FeastServices) RemoveFromNamespaceRegistry ¶
func (feast *FeastServices) RemoveFromNamespaceRegistry() error
RemoveFromNamespaceRegistry removes a feature store instance from the namespace registry
type FeatureServerYamlConfig ¶
type FeatureServerYamlConfig struct {
Type string `yaml:"type"`
Metrics *MetricsYamlConfig `yaml:"metrics,omitempty"`
OfflinePushBatchingEnabled *bool `yaml:"offline_push_batching_enabled,omitempty"`
OfflinePushBatchingBatchSize *int32 `yaml:"offline_push_batching_batch_size,omitempty"`
OfflinePushBatchingBatchIntervalSeconds *int32 `yaml:"offline_push_batching_batch_interval_seconds,omitempty"`
McpEnabled *bool `yaml:"mcp_enabled,omitempty"`
McpServerName *string `yaml:"mcp_server_name,omitempty"`
McpServerVersion *string `yaml:"mcp_server_version,omitempty"`
McpTransport *string `yaml:"mcp_transport,omitempty"`
}
FeatureServerYamlConfig maps to the feature_server section of feature_store.yaml. Field names match Feast's Python SDK YAML keys exactly.
type MaterializationYamlConfig ¶
type MaterializationYamlConfig struct {
OnlineWriteBatchSize *int32 `yaml:"online_write_batch_size,omitempty"`
ExtraConfig map[string]interface{} `yaml:",inline,omitempty"`
}
MaterializationYamlConfig maps to the materialization section of feature_store.yaml. ExtraConfig is merged inline so future Feast MaterializationConfig fields appear at the same YAML level as the typed fields above.
type MetricsYamlConfig ¶
type MetricsYamlConfig struct {
Enabled bool `yaml:"enabled"`
Categories map[string]interface{} `yaml:",inline,omitempty"`
}
MetricsYamlConfig maps to the feature_server.metrics section of feature_store.yaml. Category booleans are merged inline so they sit at the same YAML level as "enabled". Keys must be valid Feast MetricsConfig field names for the SDK version in use (e.g. resource, request, online_features, push, materialization, freshness). Note: Feast's MetricsConfig uses extra="forbid", so unknown keys will be rejected by SDK validation.
type NamespaceRegistryData ¶
NamespaceRegistryData represents the structure of data stored in the namespace registry ConfigMap
type OfflineConfigType ¶
type OfflineConfigType string
OfflineConfigType provider name or a class name that implements Offline Store
type OfflineStoreConfig ¶
type OfflineStoreConfig struct {
Host string `yaml:"host,omitempty"`
Type OfflineConfigType `yaml:"type,omitempty"`
Port int `yaml:"port,omitempty"`
Scheme string `yaml:"scheme,omitempty"`
Cert string `yaml:"cert,omitempty"`
DBParameters map[string]interface{} `yaml:",inline,omitempty"`
}
OfflineStoreConfig is the configuration that relates to reading from and writing to the Feast offline store.
type OidcPropertyType ¶
type OidcPropertyType string
OidcPropertyType defines the OIDC property type
type OnlineConfigType ¶
type OnlineConfigType string
OnlineConfigType provider name or a class name that implements Online Store
type OnlineStoreConfig ¶
type OnlineStoreConfig struct {
Path string `yaml:"path,omitempty"`
Type OnlineConfigType `yaml:"type,omitempty"`
Cert string `yaml:"cert,omitempty"`
DBParameters map[string]interface{} `yaml:",inline,omitempty"`
}
OnlineStoreConfig is the configuration that relates to reading from and writing to the Feast online store.
type OpenLineageYamlConfig ¶
type OpenLineageYamlConfig struct {
Enabled bool `yaml:"enabled"`
TransportType *string `yaml:"transport_type,omitempty"`
TransportUrl *string `yaml:"transport_url,omitempty"`
TransportEndpoint *string `yaml:"transport_endpoint,omitempty"`
ApiKey *string `yaml:"api_key,omitempty"`
ExtraConfig map[string]interface{} `yaml:",inline,omitempty"`
}
OpenLineageYamlConfig maps to the openlineage section of feature_store.yaml. ExtraConfig is merged inline so all extra key-value pairs (namespace, producer, emit_on_apply, emit_on_materialize, transport-specific options, etc.) appear at the same YAML level as the typed connection fields.
type RegistryConfig ¶
type RegistryConfig struct {
Path string `yaml:"path,omitempty"`
RegistryType RegistryConfigType `yaml:"registry_type,omitempty"`
Cert string `yaml:"cert,omitempty"`
S3AdditionalKwargs *map[string]string `yaml:"s3_additional_kwargs,omitempty"`
CacheTTLSeconds *int32 `yaml:"cache_ttl_seconds,omitempty"`
CacheMode *string `yaml:"cache_mode,omitempty"`
DBParameters map[string]interface{} `yaml:",inline,omitempty"`
}
RegistryConfig is the configuration that relates to reading from and writing to the Feast registry.
type RegistryConfigType ¶
type RegistryConfigType string
RegistryConfigType provider name or a class name that implements Registry
type RepoConfig ¶
type RepoConfig struct {
Project string `yaml:"project,omitempty"`
Provider FeastProviderType `yaml:"provider,omitempty"`
OfflineStore OfflineStoreConfig `yaml:"offline_store,omitempty"`
OnlineStore OnlineStoreConfig `yaml:"online_store,omitempty"`
Registry RegistryConfig `yaml:"registry,omitempty"`
AuthzConfig AuthzConfig `yaml:"auth,omitempty"`
EntityKeySerializationVersion int `yaml:"entity_key_serialization_version,omitempty"`
BatchEngine *ComputeEngineConfig `yaml:"batch_engine,omitempty"`
FeatureServer *FeatureServerYamlConfig `yaml:"feature_server,omitempty"`
Materialization *MaterializationYamlConfig `yaml:"materialization,omitempty"`
OpenLineage *OpenLineageYamlConfig `yaml:"openlineage,omitempty"`
}
RepoConfig is the Repo config. Typically loaded from feature_store.yaml. https://rtd.feast.dev/en/stable/#feast.repo_config.RepoConfig