FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: Add online/offline replica support by dandawg · Pull Request #4812 · feast-dev/feast · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .go  (11) .yaml  (2) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ type FeatureStoreServices struct {

// OfflineStore configures the deployed offline store service
type OfflineStore struct {
ServiceConfigs `json:",inline"`
Persistence *OfflineStorePersistence `json:"persistence,omitempty"`
TLS *OfflineTlsConfigs `json:"tls,omitempty"`
StoreServiceConfigs `json:",inline"`
Persistence *OfflineStorePersistence `json:"persistence,omitempty"`
TLS *OfflineTlsConfigs `json:"tls,omitempty"`
// LogLevel sets the logging level for the offline store service
// Allowed values: "debug", "info", "warning", "error", "critical".
// +kubebuilder:validation:Enum=debug;info;warning;error;critical
Expand Down Expand Up @@ -134,9 +134,9 @@ var ValidOfflineStoreDBStorePersistenceTypes = []string{

// OnlineStore configures the deployed online store service
type OnlineStore struct {
ServiceConfigs `json:",inline"`
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
TLS *TlsConfigs `json:"tls,omitempty"`
StoreServiceConfigs `json:",inline"`
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
TLS *TlsConfigs `json:"tls,omitempty"`
// LogLevel sets the logging level for the online store service
// Allowed values: "debug", "info", "warning", "error", "critical".
// +kubebuilder:validation:Enum=debug;info;warning;error;critical
Expand Down Expand Up @@ -297,6 +297,14 @@ type DefaultConfigs struct {
Image *string `json:"image,omitempty"`
}

// StoreServiceConfigs k8s deployment settings
type StoreServiceConfigs struct {
// Replicas determines the number of pods for the feast service.
// When Replicas > 1, persistence is recommended.
Replicas *int32 `json:"replicas,omitempty"`
Comment thread
tchughesiv marked this conversation as resolved.
ServiceConfigs `json:",inline"`
}

// OptionalConfigs k8s container settings that are optional
type OptionalConfigs struct {
Env *[]corev1.EnvVar `json:"env,omitempty"`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ spec:
x-kubernetes-validations:
- message: One selection required between file or store.
rule: '[has(self.file), has(self.store)].exists_one(c, c)'
replicas:
description: |-
Replicas determines the number of pods for the feast service.
When Replicas > 1, persistence is recommended.
format: int32
type: integer
resources:
description: ResourceRequirements describes the compute resource
requirements.
Expand Down Expand Up @@ -745,6 +751,12 @@ spec:
x-kubernetes-validations:
- message: One selection required between file or store.
rule: '[has(self.file), has(self.store)].exists_one(c, c)'
replicas:
description: |-
Replicas determines the number of pods for the feast service.
When Replicas > 1, persistence is recommended.
format: int32
type: integer
resources:
description: ResourceRequirements describes the compute resource
requirements.
Expand Down Expand Up @@ -1614,6 +1626,12 @@ spec:
- message: One selection required between file or store.
rule: '[has(self.file), has(self.store)].exists_one(c,
c)'
replicas:
description: |-
Replicas determines the number of pods for the feast service.
When Replicas > 1, persistence is recommended.
format: int32
type: integer
resources:
description: ResourceRequirements describes the compute
resource requirements.
Expand Down Expand Up @@ -1997,6 +2015,12 @@ spec:
- message: One selection required between file or store.
rule: '[has(self.file), has(self.store)].exists_one(c,
c)'
replicas:
description: |-
Replicas determines the number of pods for the feast service.
When Replicas > 1, persistence is recommended.
format: int32
type: integer
resources:
description: ResourceRequirements describes the compute
resource requirements.
Expand Down
24 changes: 24 additions & 0 deletions infra/feast-operator/dist/install.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,12 @@ spec:
x-kubernetes-validations:
- message: One selection required between file or store.
rule: '[has(self.file), has(self.store)].exists_one(c, c)'
replicas:
description: |-
Replicas determines the number of pods for the feast service.
When Replicas > 1, persistence is recommended.
format: int32
type: integer
resources:
description: ResourceRequirements describes the compute resource
requirements.
Expand Down Expand Up @@ -753,6 +759,12 @@ spec:
x-kubernetes-validations:
- message: One selection required between file or store.
rule: '[has(self.file), has(self.store)].exists_one(c, c)'
replicas:
description: |-
Replicas determines the number of pods for the feast service.
When Replicas > 1, persistence is recommended.
format: int32
type: integer
resources:
description: ResourceRequirements describes the compute resource
requirements.
Expand Down Expand Up @@ -1622,6 +1634,12 @@ spec:
- message: One selection required between file or store.
rule: '[has(self.file), has(self.store)].exists_one(c,
c)'
replicas:
description: |-
Replicas determines the number of pods for the feast service.
When Replicas > 1, persistence is recommended.
format: int32
type: integer
resources:
description: ResourceRequirements describes the compute
resource requirements.
Expand Down Expand Up @@ -2005,6 +2023,12 @@ spec:
- message: One selection required between file or store.
rule: '[has(self.file), has(self.store)].exists_one(c,
c)'
replicas:
description: |-
Replicas determines the number of pods for the feast service.
When Replicas > 1, persistence is recommended.
format: int32
type: integer
resources:
description: ResourceRequirements describes the compute
resource requirements.
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ var _ = Describe("FeatureStore Controller - db storage services", func() {
Context("When deploying a resource with all db storage services", func() {
const resourceName = "cr-name"
var pullPolicy = corev1.PullAlways
var replicas = int32(1)

ctx := context.Background()

Expand Down Expand Up @@ -205,7 +206,7 @@ var _ = Describe("FeatureStore Controller - db storage services", func() {
By("creating the custom resource for the Kind FeatureStore")
err = k8sClient.Get(ctx, typeNamespacedName, featurestore)
if err != nil && errors.IsNotFound(err) {
resource := createFeatureStoreResource(resourceName, image, pullPolicy, &[]corev1.EnvVar{})
resource := createFeatureStoreResource(resourceName, image, pullPolicy, replicas, &[]corev1.EnvVar{})
resource.Spec.Services.OfflineStore.Persistence = &feastdevv1alpha1.OfflineStorePersistence{
DBPersistence: &feastdevv1alpha1.OfflineStoreDBStorePersistence{
Type: string(offlineType),
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var _ = Describe("FeatureStore Controller-Ephemeral services", func() {
const resourceName = "services-ephemeral"
const offlineType = "duckdb"
var pullPolicy = corev1.PullAlways
var replicas = int32(1)
var testEnvVarName = "testEnvVarName"
var testEnvVarValue = "testEnvVarValue"

Expand All @@ -65,7 +66,7 @@ var _ = Describe("FeatureStore Controller-Ephemeral services", func() {
By("creating the custom resource for the Kind FeatureStore")
err := k8sClient.Get(ctx, typeNamespacedName, featurestore)
if err != nil && errors.IsNotFound(err) {
resource := createFeatureStoreResource(resourceName, image, pullPolicy, &[]corev1.EnvVar{{Name: testEnvVarName, Value: testEnvVarValue},
resource := createFeatureStoreResource(resourceName, image, pullPolicy, replicas, &[]corev1.EnvVar{{Name: testEnvVarName, Value: testEnvVarValue},
{Name: "fieldRefName", ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{APIVersion: "v1", FieldPath: "metadata.namespace"}}}})
resource.Spec.Services.OfflineStore.Persistence = &feastdevv1alpha1.OfflineStorePersistence{
FilePersistence: &feastdevv1alpha1.OfflineStoreFilePersistence{
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var _ = Describe("FeatureStore Controller-Kubernetes authorization", func() {
Context("When deploying a resource with all ephemeral services and Kubernetes authorization", func() {
const resourceName = "kubernetes-authorization"
var pullPolicy = corev1.PullAlways
var replicas = int32(1)

ctx := context.Background()

Expand All @@ -62,7 +63,7 @@ var _ = Describe("FeatureStore Controller-Kubernetes authorization", func() {
By("creating the custom resource for the Kind FeatureStore")
err := k8sClient.Get(ctx, typeNamespacedName, featurestore)
if err != nil && errors.IsNotFound(err) {
resource := createFeatureStoreResource(resourceName, image, pullPolicy, &[]corev1.EnvVar{})
resource := createFeatureStoreResource(resourceName, image, pullPolicy, replicas, &[]corev1.EnvVar{})
resource.Spec.AuthzConfig = &feastdevv1alpha1.AuthzConfig{KubernetesAuthz: &feastdevv1alpha1.KubernetesAuthz{
Roles: roles,
}}
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var _ = Describe("FeatureStore Controller-Ephemeral services", func() {
Context("When deploying a resource with all ephemeral services", func() {
const resourceName = "services-object-store"
var pullPolicy = corev1.PullAlways
var replicas = int32(1)
var testEnvVarName = "testEnvVarName"
var testEnvVarValue = "testEnvVarValue"

Expand All @@ -67,7 +68,7 @@ var _ = Describe("FeatureStore Controller-Ephemeral services", func() {
By("creating the custom resource for the Kind FeatureStore")
err := k8sClient.Get(ctx, typeNamespacedName, featurestore)
if err != nil && errors.IsNotFound(err) {
resource := createFeatureStoreResource(resourceName, image, pullPolicy, &[]corev1.EnvVar{{Name: testEnvVarName, Value: testEnvVarValue},
resource := createFeatureStoreResource(resourceName, image, pullPolicy, replicas, &[]corev1.EnvVar{{Name: testEnvVarName, Value: testEnvVarValue},
{Name: "fieldRefName", ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{APIVersion: "v1", FieldPath: "metadata.namespace"}}}})
resource.Spec.Services.OnlineStore = nil
resource.Spec.Services.OfflineStore = nil
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ var _ = Describe("FeatureStore Controller-OIDC authorization", func() {
const resourceName = "oidc-authorization"
const oidcSecretName = "oidc-secret"
var pullPolicy = corev1.PullAlways
var replicas = int32(1)

ctx := context.Background()

Expand All @@ -73,7 +74,7 @@ var _ = Describe("FeatureStore Controller-OIDC authorization", func() {
By("creating the custom resource for the Kind FeatureStore")
err = k8sClient.Get(ctx, typeNamespacedName, featurestore)
if err != nil && errors.IsNotFound(err) {
resource := createFeatureStoreResource(resourceName, image, pullPolicy, &[]corev1.EnvVar{})
resource := createFeatureStoreResource(resourceName, image, pullPolicy, replicas, &[]corev1.EnvVar{})
resource.Spec.AuthzConfig = &feastdevv1alpha1.AuthzConfig{OidcAuthz: &feastdevv1alpha1.OidcAuthz{
SecretRef: corev1.LocalObjectReference{
Name: oidcSecretName,
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var _ = Describe("FeatureStore Controller-Ephemeral services", func() {
Context("When deploying a resource with all ephemeral services", func() {
const resourceName = "services-pvc"
var pullPolicy = corev1.PullAlways
var replicas = int32(1)
var testEnvVarName = "testEnvVarName"
var testEnvVarValue = "testEnvVarValue"

Expand Down Expand Up @@ -77,7 +78,7 @@ var _ = Describe("FeatureStore Controller-Ephemeral services", func() {
By("creating the custom resource for the Kind FeatureStore")
err := k8sClient.Get(ctx, typeNamespacedName, featurestore)
if err != nil && errors.IsNotFound(err) {
resource := createFeatureStoreResource(resourceName, image, pullPolicy, &[]corev1.EnvVar{{Name: testEnvVarName, Value: testEnvVarValue},
resource := createFeatureStoreResource(resourceName, image, pullPolicy, replicas, &[]corev1.EnvVar{{Name: testEnvVarName, Value: testEnvVarValue},
{Name: "fieldRefName", ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{APIVersion: "v1", FieldPath: "metadata.namespace"}}}})
resource.Spec.Services.OfflineStore.Persistence = &feastdevv1alpha1.OfflineStorePersistence{
FilePersistence: &feastdevv1alpha1.OfflineStoreFilePersistence{
Expand Down
Loading

Back | FazBrowse Home | New Git URL