Skip to content

Commit

Permalink
single deployment refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Tommy Hughes <[email protected]>
  • Loading branch information
tchughesiv committed Dec 19, 2024
1 parent 132ce2a commit 84c485f
Show file tree
Hide file tree
Showing 22 changed files with 1,135 additions and 1,737 deletions.
26 changes: 9 additions & 17 deletions infra/feast-operator/api/v1alpha1/featurestore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type FeatureStoreSpec struct {
AuthzConfig *AuthzConfig `json:"authz,omitempty"`
}

// FeatureStoreServices defines the desired feast service deployments. ephemeral registry is deployed by default.
// FeatureStoreServices defines the desired feast services. An ephemeral registry is deployed by default.
type FeatureStoreServices struct {
OfflineStore *OfflineStore `json:"offlineStore,omitempty"`
OnlineStore *OnlineStore `json:"onlineStore,omitempty"`
Expand All @@ -74,9 +74,9 @@ type FeatureStoreServices struct {

// OfflineStore configures the deployed offline store service
type OfflineStore struct {
StoreServiceConfigs `json:",inline"`
Persistence *OfflineStorePersistence `json:"persistence,omitempty"`
TLS *TlsConfigs `json:"tls,omitempty"`
ServiceConfigs `json:",inline"`
Persistence *OfflineStorePersistence `json:"persistence,omitempty"`
TLS *TlsConfigs `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 @@ -127,9 +127,9 @@ var ValidOfflineStoreDBStorePersistenceTypes = []string{

// OnlineStore configures the deployed online store service
type OnlineStore struct {
StoreServiceConfigs `json:",inline"`
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
TLS *TlsConfigs `json:"tls,omitempty"`
ServiceConfigs `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 @@ -235,11 +235,11 @@ type PvcConfig struct {
Create *PvcCreate `json:"create,omitempty"`
// MountPath within the container at which the volume should be mounted.
// Must start by "/" and cannot contain ':'.
MountPath string `json:"mountPath,omitempty"`
MountPath string `json:"mountPath"`
}

// PvcCreate defines the immutable settings to create a new PVC mounted at the given path.
// The PVC name is the same as the associated deployment name.
// The PVC name is the same as the associated deployment & feast service name.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="PvcCreate is immutable"
type PvcCreate struct {
// StorageClassName is the name of an existing StorageClass to which this persistent volume belongs. Empty value
Expand Down Expand Up @@ -290,14 +290,6 @@ 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"`
ServiceConfigs `json:",inline"`
}

// OptionalConfigs k8s container settings that are optional
type OptionalConfigs struct {
Env *[]corev1.EnvVar `json:"env,omitempty"`
Expand Down
25 changes: 2 additions & 23 deletions infra/feast-operator/api/v1alpha1/zz_generated.deepcopy.go

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

44 changes: 16 additions & 28 deletions infra/feast-operator/config/crd/bases/feast.dev_featurestores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ spec:
pattern: ^[A-Za-z0-9][A-Za-z0-9_]*$
type: string
services:
description: FeatureStoreServices defines the desired feast service
deployments. ephemeral registry is deployed by default.
description: FeatureStoreServices defines the desired feast services.
An ephemeral registry is deployed by default.
properties:
offlineStore:
description: OfflineStore configures the deployed offline store
Expand Down Expand Up @@ -312,6 +312,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref and
Expand Down Expand Up @@ -369,12 +371,6 @@ 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 @@ -680,6 +676,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref and
Expand Down Expand Up @@ -748,12 +746,6 @@ 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 @@ -1064,6 +1056,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref
Expand Down Expand Up @@ -1351,8 +1345,8 @@ spec:
pattern: ^[A-Za-z0-9][A-Za-z0-9_]*$
type: string
services:
description: FeatureStoreServices defines the desired feast service
deployments. ephemeral registry is deployed by default.
description: FeatureStoreServices defines the desired feast services.
An ephemeral registry is deployed by default.
properties:
offlineStore:
description: OfflineStore configures the deployed offline
Expand Down Expand Up @@ -1564,6 +1558,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref
Expand Down Expand Up @@ -1623,12 +1619,6 @@ 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 @@ -1937,6 +1927,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref
Expand Down Expand Up @@ -2008,12 +2000,6 @@ 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 @@ -2331,6 +2317,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between
Expand Down
44 changes: 16 additions & 28 deletions infra/feast-operator/dist/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ spec:
pattern: ^[A-Za-z0-9][A-Za-z0-9_]*$
type: string
services:
description: FeatureStoreServices defines the desired feast service
deployments. ephemeral registry is deployed by default.
description: FeatureStoreServices defines the desired feast services.
An ephemeral registry is deployed by default.
properties:
offlineStore:
description: OfflineStore configures the deployed offline store
Expand Down Expand Up @@ -320,6 +320,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref and
Expand Down Expand Up @@ -377,12 +379,6 @@ 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 @@ -688,6 +684,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref and
Expand Down Expand Up @@ -756,12 +754,6 @@ 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 @@ -1072,6 +1064,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref
Expand Down Expand Up @@ -1359,8 +1353,8 @@ spec:
pattern: ^[A-Za-z0-9][A-Za-z0-9_]*$
type: string
services:
description: FeatureStoreServices defines the desired feast service
deployments. ephemeral registry is deployed by default.
description: FeatureStoreServices defines the desired feast services.
An ephemeral registry is deployed by default.
properties:
offlineStore:
description: OfflineStore configures the deployed offline
Expand Down Expand Up @@ -1572,6 +1566,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref
Expand Down Expand Up @@ -1631,12 +1627,6 @@ 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 @@ -1945,6 +1935,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between ref
Expand Down Expand Up @@ -2016,12 +2008,6 @@ 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 @@ -2339,6 +2325,8 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
required:
- mountPath
type: object
x-kubernetes-validations:
- message: One selection is required between
Expand Down
Loading

0 comments on commit 84c485f

Please sign in to comment.