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

fix: Fix db store types in Operator CRD by tchughesiv · Pull Request #4798 · 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  (4) .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 @@ -96,9 +96,9 @@ var ValidOfflineStoreFilePersistenceTypes = []string{
// OfflineStoreDBStorePersistence configures the DB store persistence for the offline store service
type OfflineStoreDBStorePersistence struct {
// +kubebuilder:validation:Enum=snowflake.offline;bigquery;redshift;spark;postgres;feast_trino.trino.TrinoOfflineStore;redis
Type string `json:"type,omitempty"`
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
SecretKeyName string `json:"secretKeyName,omitempty"`
Type string `json:"type"`
SecretRef corev1.LocalObjectReference `json:"secretRef"`
SecretKeyName string `json:"secretKeyName,omitempty"`
}

var ValidOfflineStoreDBStorePersistenceTypes = []string{
Expand Down Expand Up @@ -136,9 +136,9 @@ type OnlineStoreFilePersistence struct {
// OnlineStoreDBStorePersistence configures the DB store persistence for the offline store service
type OnlineStoreDBStorePersistence struct {
// +kubebuilder:validation:Enum=snowflake.online;redis;ikv;datastore;dynamodb;bigtable;postgres;cassandra;mysql;hazelcast;singlestore
Type string `json:"type,omitempty"`
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
SecretKeyName string `json:"secretKeyName,omitempty"`
Type string `json:"type"`
SecretRef corev1.LocalObjectReference `json:"secretRef"`
SecretKeyName string `json:"secretKeyName,omitempty"`
}

var ValidOnlineStoreDBStorePersistenceTypes = []string{
Expand Down Expand Up @@ -181,9 +181,9 @@ type RegistryFilePersistence struct {
// RegistryDBStorePersistence configures the DB store persistence for the registry service
type RegistryDBStorePersistence struct {
// +kubebuilder:validation:Enum=sql;snowflake.registry
Type string `json:"type,omitempty"`
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
SecretKeyName string `json:"secretKeyName,omitempty"`
Type string `json:"type"`
SecretRef corev1.LocalObjectReference `json:"secretRef"`
SecretKeyName string `json:"secretKeyName,omitempty"`
}

var ValidRegistryDBStorePersistenceTypes = []string{
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 @@ -299,6 +299,9 @@ spec:
- feast_trino.trino.TrinoOfflineStore
- redis
type: string
required:
- secretRef
- type
type: object
type: object
x-kubernetes-validations:
Expand Down Expand Up @@ -614,6 +617,9 @@ spec:
- hazelcast
- singlestore
type: string
required:
- secretRef
- type
type: object
type: object
x-kubernetes-validations:
Expand Down Expand Up @@ -937,6 +943,9 @@ spec:
- sql
- snowflake.registry
type: string
required:
- secretRef
- type
type: object
type: object
resources:
Expand Down Expand Up @@ -1292,6 +1301,9 @@ spec:
- feast_trino.trino.TrinoOfflineStore
- redis
type: string
required:
- secretRef
- type
type: object
type: object
x-kubernetes-validations:
Expand Down Expand Up @@ -1612,6 +1624,9 @@ spec:
- hazelcast
- singlestore
type: string
required:
- secretRef
- type
type: object
type: object
x-kubernetes-validations:
Expand Down Expand Up @@ -1943,6 +1958,9 @@ spec:
- sql
- snowflake.registry
type: string
required:
- secretRef
- type
type: object
type: object
resources:
Expand Down
18 changes: 18 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 @@ -307,6 +307,9 @@ spec:
- feast_trino.trino.TrinoOfflineStore
- redis
type: string
required:
- secretRef
- type
type: object
type: object
x-kubernetes-validations:
Expand Down Expand Up @@ -622,6 +625,9 @@ spec:
- hazelcast
- singlestore
type: string
required:
- secretRef
- type
type: object
type: object
x-kubernetes-validations:
Expand Down Expand Up @@ -945,6 +951,9 @@ spec:
- sql
- snowflake.registry
type: string
required:
- secretRef
- type
type: object
type: object
resources:
Expand Down Expand Up @@ -1300,6 +1309,9 @@ spec:
- feast_trino.trino.TrinoOfflineStore
- redis
type: string
required:
- secretRef
- type
type: object
type: object
x-kubernetes-validations:
Expand Down Expand Up @@ -1620,6 +1632,9 @@ spec:
- hazelcast
- singlestore
type: string
required:
- secretRef
- type
type: object
type: object
x-kubernetes-validations:
Expand Down Expand Up @@ -1951,6 +1966,9 @@ spec:
- sql
- snowflake.registry
type: string
required:
- secretRef
- type
type: object
type: object
resources:
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 @@ -190,7 +190,7 @@ var _ = Describe("Repo Config", func() {
Persistence: &feastdevv1alpha1.OfflineStorePersistence{
DBPersistence: &feastdevv1alpha1.OfflineStoreDBStorePersistence{
Type: string(OfflineDBPersistenceSnowflakeConfigType),
SecretRef: &corev1.LocalObjectReference{
SecretRef: corev1.LocalObjectReference{
Name: "offline-test-secret",
},
},
Expand All @@ -200,7 +200,7 @@ var _ = Describe("Repo Config", func() {
Persistence: &feastdevv1alpha1.OnlineStorePersistence{
DBPersistence: &feastdevv1alpha1.OnlineStoreDBStorePersistence{
Type: string(OnlineDBPersistenceSnowflakeConfigType),
SecretRef: &corev1.LocalObjectReference{
SecretRef: corev1.LocalObjectReference{
Name: "online-test-secret",
},
},
Expand All @@ -211,7 +211,7 @@ var _ = Describe("Repo Config", func() {
Persistence: &feastdevv1alpha1.RegistryPersistence{
DBPersistence: &feastdevv1alpha1.RegistryDBStorePersistence{
Type: string(RegistryDBPersistenceSnowflakeConfigType),
SecretRef: &corev1.LocalObjectReference{
SecretRef: corev1.LocalObjectReference{
Name: "registry-test-secret",
},
},
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 @@ -110,7 +110,7 @@ func (feast *FeastServices) validateRegistryPersistence(registryPersistence *fea
return err
}

if dbPersistence.SecretRef != nil {
if len(dbPersistence.SecretRef.Name) > 0 {
secretRef := dbPersistence.SecretRef.Name
if _, err := feast.getSecret(secretRef); err != nil {
return err
Expand All @@ -131,7 +131,7 @@ func (feast *FeastServices) validateOnlineStorePersistence(onlinePersistence *fe
return err
}

if dbPersistence.SecretRef != nil {
if len(dbPersistence.SecretRef.Name) > 0 {
secretRef := dbPersistence.SecretRef.Name
if _, err := feast.getSecret(secretRef); err != nil {
return err
Expand All @@ -158,7 +158,7 @@ func (feast *FeastServices) validateOfflineStorePersistence(offlinePersistence *
return err
}

if dbPersistence.SecretRef != nil {
if len(dbPersistence.SecretRef.Name) > 0 {
secretRef := dbPersistence.SecretRef.Name
if _, err := feast.getSecret(secretRef); err != nil {
return err
Expand Down

Back | FazBrowse Home | New Git URL