Skip to content

Commit 3c53116

Browse files
tchughesivdharmisha
authored andcommitted
fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (feast-dev#4863)
* single deployment refactor Signed-off-by: Tommy Hughes <tohughes@redhat.com> * fix e2e tests Signed-off-by: Tommy Hughes <tohughes@redhat.com> --------- Signed-off-by: Tommy Hughes <tohughes@redhat.com>
1 parent a90f12e commit 3c53116

25 files changed

+1549
-550
lines changed

infra/feast-operator/api/v1alpha1/featurestore_types.go

+21-9
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ type FeatureStoreServices struct {
8282

8383
// OfflineStore configures the deployed offline store service
8484
type OfflineStore struct {
85+
<<<<<<< HEAD
8586
<<<<<<< HEAD
8687
ServiceConfigs `json:",inline"`
8788
Persistence *OfflineStorePersistence `json:"persistence,omitempty"`
@@ -102,6 +103,11 @@ type OfflineStore struct {
102103
=======
103104
TLS *TlsConfigs `json:"tls,omitempty"`
104105
>>>>>>> f36959cb2 (fix: Remove verifyClient TLS offlineStore option from the Operator (#4847))
106+
=======
107+
ServiceConfigs `json:",inline"`
108+
Persistence *OfflineStorePersistence `json:"persistence,omitempty"`
109+
TLS *TlsConfigs `json:"tls,omitempty"`
110+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
105111
// LogLevel sets the logging level for the offline store service
106112
// Allowed values: "debug", "info", "warning", "error", "critical".
107113
// +kubebuilder:validation:Enum=debug;info;warning;error;critical
@@ -196,6 +202,7 @@ var ValidOfflineStoreDBStorePersistenceTypes = []string{
196202

197203
// OnlineStore configures the deployed online store service
198204
type OnlineStore struct {
205+
<<<<<<< HEAD
199206
<<<<<<< HEAD
200207
ServiceConfigs `json:",inline"`
201208
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
@@ -209,6 +216,11 @@ type OnlineStore struct {
209216
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
210217
TLS *TlsConfigs `json:"tls,omitempty"`
211218
>>>>>>> 47204bcaf (feat: Add online/offline replica support (#4812))
219+
=======
220+
ServiceConfigs `json:",inline"`
221+
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
222+
TLS *TlsConfigs `json:"tls,omitempty"`
223+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
212224
// LogLevel sets the logging level for the online store service
213225
// Allowed values: "debug", "info", "warning", "error", "critical".
214226
// +kubebuilder:validation:Enum=debug;info;warning;error;critical
@@ -232,10 +244,14 @@ type OnlineStorePersistence struct {
232244
// +kubebuilder:validation:XValidation:rule="(has(self.pvc) && has(self.path)) ? !self.path.startsWith('/') : true",message="PVC path must be a file name only, with no slashes."
233245
<<<<<<< HEAD
234246
<<<<<<< HEAD
247+
<<<<<<< HEAD
235248
// +kubebuilder:validation:XValidation:rule="has(self.path) ? !(self.path.startsWith('s3://') || self.path.startsWith('gs://')) : true",message="Online store does not support S3 or GS buckets."
236249
=======
237250
// +kubebuilder:validation:XValidation:rule="has(self.path) && !self.path.startsWith('s3://') && !self.path.startsWith('gs://')",message="Online store does not support S3 or GS buckets."
238251
>>>>>>> bc64ddfac (feat: Object store persistence in operator (#4758))
252+
=======
253+
// +kubebuilder:validation:XValidation:rule="has(self.path) ? !(self.path.startsWith('s3://') || self.path.startsWith('gs://')) : true",message="Online store does not support S3 or GS buckets."
254+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
239255
type OnlineStoreFilePersistence struct {
240256
Path string `json:"path,omitempty"`
241257
PvcConfig *PvcConfig `json:"pvc,omitempty"`
@@ -414,6 +430,7 @@ type PvcConfig struct {
414430
Create *PvcCreate `json:"create,omitempty"`
415431
// MountPath within the container at which the volume should be mounted.
416432
// Must start by "/" and cannot contain ':'.
433+
<<<<<<< HEAD
417434
<<<<<<< HEAD
418435
MountPath string `json:"mountPath"`
419436
}
@@ -426,10 +443,13 @@ type PvcCreate struct {
426443
AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
427444
=======
428445
MountPath string `json:"mountPath,omitempty"`
446+
=======
447+
MountPath string `json:"mountPath"`
448+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
429449
}
430450

431451
// PvcCreate defines the immutable settings to create a new PVC mounted at the given path.
432-
// The PVC name is the same as the associated deployment name.
452+
// The PVC name is the same as the associated deployment & feast service name.
433453
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="PvcCreate is immutable"
434454
type PvcCreate struct {
435455
<<<<<<< HEAD
@@ -486,14 +506,6 @@ type DefaultConfigs struct {
486506
Image *string `json:"image,omitempty"`
487507
}
488508

489-
// StoreServiceConfigs k8s deployment settings
490-
type StoreServiceConfigs struct {
491-
// Replicas determines the number of pods for the feast service.
492-
// When Replicas > 1, persistence is recommended.
493-
Replicas *int32 `json:"replicas,omitempty"`
494-
ServiceConfigs `json:",inline"`
495-
}
496-
497509
// OptionalConfigs k8s container settings that are optional
498510
type OptionalConfigs struct {
499511
Env *[]corev1.EnvVar `json:"env,omitempty"`

infra/feast-operator/api/v1alpha1/zz_generated.deepcopy.go

+2-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infra/feast-operator/config/crd/bases/feast.dev_featurestores.yaml

+34-28
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,16 @@ spec:
378378
type: string
379379
type: object
380380
x-kubernetes-map-type: atomic
381+
<<<<<<< HEAD
381382
<<<<<<< HEAD
382383
required:
383384
- mountPath
384385
=======
385386
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
387+
=======
388+
required:
389+
- mountPath
390+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
386391
type: object
387392
x-kubernetes-validations:
388393
- message: One selection is required between ref and
@@ -473,12 +478,6 @@ spec:
473478
x-kubernetes-validations:
474479
- message: One selection required between file or store.
475480
rule: '[has(self.file), has(self.store)].exists_one(c, c)'
476-
replicas:
477-
description: |-
478-
Replicas determines the number of pods for the feast service.
479-
When Replicas > 1, persistence is recommended.
480-
format: int32
481-
type: integer
482481
resources:
483482
description: ResourceRequirements describes the compute resource
484483
requirements.
@@ -861,11 +860,16 @@ spec:
861860
type: string
862861
type: object
863862
x-kubernetes-map-type: atomic
863+
<<<<<<< HEAD
864864
<<<<<<< HEAD
865865
required:
866866
- mountPath
867867
=======
868868
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
869+
=======
870+
required:
871+
- mountPath
872+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
869873
type: object
870874
x-kubernetes-validations:
871875
- message: One selection is required between ref and
@@ -943,8 +947,8 @@ spec:
943947
rule: '(has(self.pvc) && has(self.path)) ? !self.path.startsWith(''/'')
944948
: true'
945949
- message: Online store does not support S3 or GS buckets.
946-
rule: has(self.path) && !self.path.startsWith('s3://')
947-
&& !self.path.startsWith('gs://')
950+
rule: 'has(self.path) ? !(self.path.startsWith(''s3://'')
951+
|| self.path.startsWith(''gs://'')) : true'
948952
store:
949953
description: OnlineStoreDBStorePersistence configures
950954
the DB store persistence for the offline store service
@@ -992,12 +996,6 @@ spec:
992996
x-kubernetes-validations:
993997
- message: One selection required between file or store.
994998
rule: '[has(self.file), has(self.store)].exists_one(c, c)'
995-
replicas:
996-
description: |-
997-
Replicas determines the number of pods for the feast service.
998-
When Replicas > 1, persistence is recommended.
999-
format: int32
1000-
type: integer
1001999
resources:
10021000
description: ResourceRequirements describes the compute resource
10031001
requirements.
@@ -1364,11 +1362,16 @@ spec:
13641362
type: string
13651363
type: object
13661364
x-kubernetes-map-type: atomic
1365+
<<<<<<< HEAD
13671366
<<<<<<< HEAD
13681367
required:
13691368
- mountPath
13701369
=======
13711370
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
1371+
=======
1372+
required:
1373+
- mountPath
1374+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
13721375
type: object
13731376
x-kubernetes-validations:
13741377
- message: One selection is required between ref
@@ -1994,11 +1997,16 @@ spec:
19941997
type: string
19951998
type: object
19961999
x-kubernetes-map-type: atomic
2000+
<<<<<<< HEAD
19972001
<<<<<<< HEAD
19982002
required:
19992003
- mountPath
20002004
=======
20012005
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
2006+
=======
2007+
required:
2008+
- mountPath
2009+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
20022010
type: object
20032011
x-kubernetes-validations:
20042012
- message: One selection is required between ref
@@ -2092,12 +2100,6 @@ spec:
20922100
- message: One selection required between file or store.
20932101
rule: '[has(self.file), has(self.store)].exists_one(c,
20942102
c)'
2095-
replicas:
2096-
description: |-
2097-
Replicas determines the number of pods for the feast service.
2098-
When Replicas > 1, persistence is recommended.
2099-
format: int32
2100-
type: integer
21012103
resources:
21022104
description: ResourceRequirements describes the compute
21032105
resource requirements.
@@ -2484,11 +2486,16 @@ spec:
24842486
type: string
24852487
type: object
24862488
x-kubernetes-map-type: atomic
2489+
<<<<<<< HEAD
24872490
<<<<<<< HEAD
24882491
required:
24892492
- mountPath
24902493
=======
24912494
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
2495+
=======
2496+
required:
2497+
- mountPath
2498+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
24922499
type: object
24932500
x-kubernetes-validations:
24942501
- message: One selection is required between ref
@@ -2569,8 +2576,8 @@ spec:
25692576
: true'
25702577
- message: Online store does not support S3 or GS
25712578
buckets.
2572-
rule: has(self.path) && !self.path.startsWith('s3://')
2573-
&& !self.path.startsWith('gs://')
2579+
rule: 'has(self.path) ? !(self.path.startsWith(''s3://'')
2580+
|| self.path.startsWith(''gs://'')) : true'
25742581
store:
25752582
description: OnlineStoreDBStorePersistence configures
25762583
the DB store persistence for the offline store service
@@ -2620,12 +2627,6 @@ spec:
26202627
- message: One selection required between file or store.
26212628
rule: '[has(self.file), has(self.store)].exists_one(c,
26222629
c)'
2623-
replicas:
2624-
description: |-
2625-
Replicas determines the number of pods for the feast service.
2626-
When Replicas > 1, persistence is recommended.
2627-
format: int32
2628-
type: integer
26292630
resources:
26302631
description: ResourceRequirements describes the compute
26312632
resource requirements.
@@ -3000,11 +3001,16 @@ spec:
30003001
type: string
30013002
type: object
30023003
x-kubernetes-map-type: atomic
3004+
<<<<<<< HEAD
30033005
<<<<<<< HEAD
30043006
required:
30053007
- mountPath
30063008
=======
30073009
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
3010+
=======
3011+
required:
3012+
- mountPath
3013+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
30083014
type: object
30093015
x-kubernetes-validations:
30103016
- message: One selection is required between

infra/feast-operator/config/samples/v1alpha1_featurestore_pvc_persistence.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ metadata:
55
spec:
66
feastProject: my_project
77
services:
8+
<<<<<<< HEAD
89
<<<<<<< HEAD
910
# demonstrates using a pre-existing PVC
1011
=======
1112
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
13+
=======
14+
# demonstrates using a pre-existing PVC
15+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
1216
onlineStore:
1317
persistence:
1418
file:
@@ -17,10 +21,14 @@ spec:
1721
ref:
1822
name: online-pvc
1923
mountPath: /data/online
24+
<<<<<<< HEAD
2025
<<<<<<< HEAD
2126
# demonstrates specifying a storageClassName and storage size
2227
=======
2328
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
29+
=======
30+
# demonstrates specifying a storageClassName and storage size
31+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
2432
offlineStore:
2533
persistence:
2634
file:
@@ -32,10 +40,14 @@ spec:
3240
requests:
3341
storage: 5Gi
3442
mountPath: /data/offline
43+
<<<<<<< HEAD
3544
<<<<<<< HEAD
3645
# demonstrates letting the Operator create a PVC w/ defaults set
3746
=======
3847
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
48+
=======
49+
# demonstrates letting the Operator create a PVC w/ defaults set
50+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
3951
registry:
4052
local:
4153
persistence:
@@ -51,11 +63,15 @@ metadata:
5163
name: online-pvc
5264
spec:
5365
accessModes:
66+
<<<<<<< HEAD
5467
<<<<<<< HEAD
5568
- ReadWriteOnce
5669
=======
5770
- ReadWriteMany
5871
>>>>>>> 6c1a66ea8 (feat: PVC configuration and impl (#4750))
72+
=======
73+
- ReadWriteOnce
74+
>>>>>>> b0a04af1d (fix: Refactor Operator to deploy all feast services to the same Deployment/Pod (#4863))
5975
resources:
6076
requests:
6177
storage: 5Gi

0 commit comments

Comments
 (0)