Skip to content

Commit

Permalink
Incorporating code review comments
Browse files Browse the repository at this point in the history
Signed-off-by: lrangine <[email protected]>
  • Loading branch information
lokeshrangineni committed Jan 31, 2025
1 parent 82360d7 commit a951fc8
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
apiVersion: v1
kind: Secret
metadata:
name: postgres-secret
namespace: test
labels:
app: postgres
stringData:
POSTGRES_DB: feast
POSTGRES_USER: feast
POSTGRES_PASSWORD: feast
---
apiVersion: v1
kind: Secret
metadata:
name: feast-data-stores
namespace: test
stringData:
postgres-secret-parameters: |
path: postgresql+psycopg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres.test.svc.cluster.local:5432/${POSTGRES_DB}
cache_ttl_seconds: 60
sqlalchemy_config_kwargs:
echo: false
pool_pre_ping: true
postgres: |
host: postgres.test.svc.cluster.local
port: 5432
database: ${POSTGRES_DB}
db_schema: public
user: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: feast-config
namespace: test
data:
feature_store.yaml: |
registry:
path: /config/registry.db
---
apiVersion: feast.dev/v1alpha1
kind: FeatureStore
metadata:
name: example
namespace: test
spec:
feastProject: my_project
services:
volumes:
- name: feast-config-volume
configMap:
name: feast-config
- name: cache-volume
emptyDir: {}

onlineStore:
persistence:
store:
type: postgres
secretRef:
name: feast-data-stores
envFrom:
- secretRef:
name: postgres-secret
volumeMounts:
- mountPath: /config
name: feast-config-volume
- mountPath: /cache
name: cache-volume

registry:
local:
persistence:
store:
type: sql
secretRef:
name: feast-data-stores
secretKeyName: postgres-secret-parameters
envFrom:
- secretRef:
name: postgres-secret
volumeMounts:
- mountPath: /config
name: feast-config-volume
7 changes: 3 additions & 4 deletions infra/feast-operator/internal/controller/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ func (feast *FeastServices) setPod(podSpec *corev1.PodSpec) error {
feast.mountTlsConfigs(podSpec)
feast.mountPvcConfigs(podSpec)
feast.mountEmptyDirVolumes(podSpec)
feast.mountPodVolumes(podSpec)
feast.mountUserDefinedVolumes(podSpec)

return nil
}
Expand Down Expand Up @@ -380,8 +380,7 @@ func (feast *FeastServices) setContainers(podSpec *corev1.PodSpec) error {
return nil
}

func (feast *FeastServices) setContainer(containers *[]corev1.Container, feastType FeastServiceType,
fsYamlB64 string) {
func (feast *FeastServices) setContainer(containers *[]corev1.Container, feastType FeastServiceType, fsYamlB64 string) {
tls := feast.getTlsConfigs(feastType)
serviceConfigs := feast.getServiceConfigs(feastType)
defaultServiceConfigs := serviceConfigs.DefaultConfigs
Expand Down Expand Up @@ -893,7 +892,7 @@ func (feast *FeastServices) mountPvcConfig(podSpec *corev1.PodSpec, pvcConfig *f
}
}

func (feast *FeastServices) mountPodVolumes(podSpec *corev1.PodSpec) {
func (feast *FeastServices) mountUserDefinedVolumes(podSpec *corev1.PodSpec) {
var volumes []corev1.Volume
if feast.Handler.FeatureStore.Spec.Services != nil {
volumes = feast.Handler.FeatureStore.Spec.Services.Volumes
Expand Down

0 comments on commit a951fc8

Please sign in to comment.