Skip to content

Commit 2c5a6b5

Browse files
authored
feat: Updated feast Go operator db stores (feast-dev#4809)
* feat: Updated feast Go operator db stores Signed-off-by: Theodor Mihalache <tmihalac@redhat.com> * Updated sample secret following review Signed-off-by: Theodor Mihalache <tmihalac@redhat.com> --------- Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
1 parent 6406625 commit 2c5a6b5

6 files changed

Lines changed: 922 additions & 47 deletions

File tree

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

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ var ValidOfflineStoreFilePersistenceTypes = []string{
108108
// OfflineStoreDBStorePersistence configures the DB store persistence for the offline store service
109109
type OfflineStoreDBStorePersistence struct {
110110
// +kubebuilder:validation:Enum=snowflake.offline;bigquery;redshift;spark;postgres;feast_trino.trino.TrinoOfflineStore;redis
111-
Type string `json:"type"`
112-
SecretRef corev1.LocalObjectReference `json:"secretRef"`
113-
SecretKeyName string `json:"secretKeyName,omitempty"`
111+
Type string `json:"type"`
112+
// Data store parameters should be placed as-is from the "feature_store.yaml" under the secret key. "registry_type" & "type" fields should be removed.
113+
SecretRef corev1.LocalObjectReference `json:"secretRef"`
114+
// By default, the selected store "type" is used as the SecretKeyName
115+
SecretKeyName string `json:"secretKeyName,omitempty"`
114116
}
115117

116118
var ValidOfflineStoreDBStorePersistenceTypes = []string{
@@ -149,9 +151,11 @@ type OnlineStoreFilePersistence struct {
149151
// OnlineStoreDBStorePersistence configures the DB store persistence for the offline store service
150152
type OnlineStoreDBStorePersistence struct {
151153
// +kubebuilder:validation:Enum=snowflake.online;redis;ikv;datastore;dynamodb;bigtable;postgres;cassandra;mysql;hazelcast;singlestore
152-
Type string `json:"type"`
153-
SecretRef corev1.LocalObjectReference `json:"secretRef"`
154-
SecretKeyName string `json:"secretKeyName,omitempty"`
154+
Type string `json:"type"`
155+
// Data store parameters should be placed as-is from the "feature_store.yaml" under the secret key. "registry_type" & "type" fields should be removed.
156+
SecretRef corev1.LocalObjectReference `json:"secretRef"`
157+
// By default, the selected store "type" is used as the SecretKeyName
158+
SecretKeyName string `json:"secretKeyName,omitempty"`
155159
}
156160

157161
var ValidOnlineStoreDBStorePersistenceTypes = []string{
@@ -196,9 +200,11 @@ type RegistryFilePersistence struct {
196200
// RegistryDBStorePersistence configures the DB store persistence for the registry service
197201
type RegistryDBStorePersistence struct {
198202
// +kubebuilder:validation:Enum=sql;snowflake.registry
199-
Type string `json:"type"`
200-
SecretRef corev1.LocalObjectReference `json:"secretRef"`
201-
SecretKeyName string `json:"secretKeyName,omitempty"`
203+
Type string `json:"type"`
204+
// Data store parameters should be placed as-is from the "feature_store.yaml" under the secret key. "registry_type" & "type" fields should be removed.
205+
SecretRef corev1.LocalObjectReference `json:"secretRef"`
206+
// By default, the selected store "type" is used as the SecretKeyName
207+
SecretKeyName string `json:"secretKeyName,omitempty"`
202208
}
203209

204210
var ValidRegistryDBStorePersistenceTypes = []string{

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

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,13 @@ spec:
321321
the DB store persistence for the offline store service
322322
properties:
323323
secretKeyName:
324+
description: By default, the selected store "type"
325+
is used as the SecretKeyName
324326
type: string
325327
secretRef:
326-
description: |-
327-
LocalObjectReference contains enough information to let you locate the
328-
referenced object inside the same namespace.
328+
description: Data store parameters should be placed
329+
as-is from the "feature_store.yaml" under the secret
330+
key. "registry_type" & "type" fields should be removed.
329331
properties:
330332
name:
331333
description: |-
@@ -676,11 +678,13 @@ spec:
676678
the DB store persistence for the offline store service
677679
properties:
678680
secretKeyName:
681+
description: By default, the selected store "type"
682+
is used as the SecretKeyName
679683
type: string
680684
secretRef:
681-
description: |-
682-
LocalObjectReference contains enough information to let you locate the
683-
referenced object inside the same namespace.
685+
description: Data store parameters should be placed
686+
as-is from the "feature_store.yaml" under the secret
687+
key. "registry_type" & "type" fields should be removed.
684688
properties:
685689
name:
686690
description: |-
@@ -1049,11 +1053,14 @@ spec:
10491053
the DB store persistence for the registry service
10501054
properties:
10511055
secretKeyName:
1056+
description: By default, the selected store "type"
1057+
is used as the SecretKeyName
10521058
type: string
10531059
secretRef:
1054-
description: |-
1055-
LocalObjectReference contains enough information to let you locate the
1056-
referenced object inside the same namespace.
1060+
description: Data store parameters should be placed
1061+
as-is from the "feature_store.yaml" under the
1062+
secret key. "registry_type" & "type" fields
1063+
should be removed.
10571064
properties:
10581065
name:
10591066
description: |-
@@ -1517,11 +1524,14 @@ spec:
15171524
the DB store persistence for the offline store service
15181525
properties:
15191526
secretKeyName:
1527+
description: By default, the selected store "type"
1528+
is used as the SecretKeyName
15201529
type: string
15211530
secretRef:
1522-
description: |-
1523-
LocalObjectReference contains enough information to let you locate the
1524-
referenced object inside the same namespace.
1531+
description: Data store parameters should be placed
1532+
as-is from the "feature_store.yaml" under the
1533+
secret key. "registry_type" & "type" fields
1534+
should be removed.
15251535
properties:
15261536
name:
15271537
description: |-
@@ -1878,11 +1888,14 @@ spec:
18781888
the DB store persistence for the offline store service
18791889
properties:
18801890
secretKeyName:
1891+
description: By default, the selected store "type"
1892+
is used as the SecretKeyName
18811893
type: string
18821894
secretRef:
1883-
description: |-
1884-
LocalObjectReference contains enough information to let you locate the
1885-
referenced object inside the same namespace.
1895+
description: Data store parameters should be placed
1896+
as-is from the "feature_store.yaml" under the
1897+
secret key. "registry_type" & "type" fields
1898+
should be removed.
18861899
properties:
18871900
name:
18881901
description: |-
@@ -2259,11 +2272,14 @@ spec:
22592272
the DB store persistence for the registry service
22602273
properties:
22612274
secretKeyName:
2275+
description: By default, the selected store
2276+
"type" is used as the SecretKeyName
22622277
type: string
22632278
secretRef:
2264-
description: |-
2265-
LocalObjectReference contains enough information to let you locate the
2266-
referenced object inside the same namespace.
2279+
description: Data store parameters should
2280+
be placed as-is from the "feature_store.yaml"
2281+
under the secret key. "registry_type" &
2282+
"type" fields should be removed.
22672283
properties:
22682284
name:
22692285
description: |-

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

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,32 @@ spec:
1111
store:
1212
type: postgres
1313
secretRef:
14-
name: my-secret
15-
secretKeyName: mykey # optional
14+
name: postgres-secret
15+
secretKeyName: postgres-secret-parameters # optional
16+
registry:
17+
local:
18+
persistence:
19+
store:
20+
type: sql
21+
secretRef:
22+
name: postgres-secret
23+
secretKeyName: postgres-secret-parameters # optional
24+
---
25+
apiVersion: v1
26+
kind: Secret
27+
metadata:
28+
name: postgres-secret
29+
stringData:
30+
postgres-secret-parameters: |
31+
path: postgresql+postgresql://postgres:mysecretpassword@127.0.0.1:55001/feast
32+
cache_ttl_seconds: 60
33+
sqlalchemy_config_kwargs:
34+
echo: false
35+
pool_pre_ping: true
36+
postgres: |
37+
host: 127.0.0.1
38+
port: 55001
39+
database: feast
40+
db_schema: public
41+
user: postgres
42+
password: mysecretpassword

infra/feast-operator/dist/install.yaml

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,13 @@ spec:
329329
the DB store persistence for the offline store service
330330
properties:
331331
secretKeyName:
332+
description: By default, the selected store "type"
333+
is used as the SecretKeyName
332334
type: string
333335
secretRef:
334-
description: |-
335-
LocalObjectReference contains enough information to let you locate the
336-
referenced object inside the same namespace.
336+
description: Data store parameters should be placed
337+
as-is from the "feature_store.yaml" under the secret
338+
key. "registry_type" & "type" fields should be removed.
337339
properties:
338340
name:
339341
description: |-
@@ -684,11 +686,13 @@ spec:
684686
the DB store persistence for the offline store service
685687
properties:
686688
secretKeyName:
689+
description: By default, the selected store "type"
690+
is used as the SecretKeyName
687691
type: string
688692
secretRef:
689-
description: |-
690-
LocalObjectReference contains enough information to let you locate the
691-
referenced object inside the same namespace.
693+
description: Data store parameters should be placed
694+
as-is from the "feature_store.yaml" under the secret
695+
key. "registry_type" & "type" fields should be removed.
692696
properties:
693697
name:
694698
description: |-
@@ -1057,11 +1061,14 @@ spec:
10571061
the DB store persistence for the registry service
10581062
properties:
10591063
secretKeyName:
1064+
description: By default, the selected store "type"
1065+
is used as the SecretKeyName
10601066
type: string
10611067
secretRef:
1062-
description: |-
1063-
LocalObjectReference contains enough information to let you locate the
1064-
referenced object inside the same namespace.
1068+
description: Data store parameters should be placed
1069+
as-is from the "feature_store.yaml" under the
1070+
secret key. "registry_type" & "type" fields
1071+
should be removed.
10651072
properties:
10661073
name:
10671074
description: |-
@@ -1525,11 +1532,14 @@ spec:
15251532
the DB store persistence for the offline store service
15261533
properties:
15271534
secretKeyName:
1535+
description: By default, the selected store "type"
1536+
is used as the SecretKeyName
15281537
type: string
15291538
secretRef:
1530-
description: |-
1531-
LocalObjectReference contains enough information to let you locate the
1532-
referenced object inside the same namespace.
1539+
description: Data store parameters should be placed
1540+
as-is from the "feature_store.yaml" under the
1541+
secret key. "registry_type" & "type" fields
1542+
should be removed.
15331543
properties:
15341544
name:
15351545
description: |-
@@ -1886,11 +1896,14 @@ spec:
18861896
the DB store persistence for the offline store service
18871897
properties:
18881898
secretKeyName:
1899+
description: By default, the selected store "type"
1900+
is used as the SecretKeyName
18891901
type: string
18901902
secretRef:
1891-
description: |-
1892-
LocalObjectReference contains enough information to let you locate the
1893-
referenced object inside the same namespace.
1903+
description: Data store parameters should be placed
1904+
as-is from the "feature_store.yaml" under the
1905+
secret key. "registry_type" & "type" fields
1906+
should be removed.
18941907
properties:
18951908
name:
18961909
description: |-
@@ -2267,11 +2280,14 @@ spec:
22672280
the DB store persistence for the registry service
22682281
properties:
22692282
secretKeyName:
2283+
description: By default, the selected store
2284+
"type" is used as the SecretKeyName
22702285
type: string
22712286
secretRef:
2272-
description: |-
2273-
LocalObjectReference contains enough information to let you locate the
2274-
referenced object inside the same namespace.
2287+
description: Data store parameters should
2288+
be placed as-is from the "feature_store.yaml"
2289+
under the secret key. "registry_type" &
2290+
"type" fields should be removed.
22752291
properties:
22762292
name:
22772293
description: |-

0 commit comments

Comments
 (0)