feast-dev / feast

The Open Source Feature Store for Machine Learning
https://feast.dev
Apache License 2.0
5.62k stars 1k forks source link

feat: Added feast Go operator db stores support #4771

Open tmihalac opened 2 days ago

tmihalac commented 2 days ago

What this PR does / why we need it:

This PR adds db stores persistence configuration options to the FeatureStore CRD. DB store para

kind: Secret
apiVersion: v1
metadata:
  name: my-secret
  namespace: test
  uid: b410b5e5-857b-4611-acc3-1302b8c6c68c
  resourceVersion: '62030'
  creationTimestamp: '2024-11-19T20:25:15Z'
  managedFields:
    - manager: kubectl-create
      operation: Update
      apiVersion: v1
      time: '2024-11-19T20:25:15Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:data':
          .: {}
          'f:mykey': {}
        'f:type': {}
data:
  postgres: |
    host: DB_HOST
    port: DB_PORT
    database: DB_NAME
    db_schema: DB_SCHEMA
    user: DB_USERNAME
    password: DB_PASSWORD
    sslmode: verify-ca
    sslkey_path: /path/to/client-key.pem
    sslcert_path: /path/to/client-cert.pem
    sslrootcert_path: /path/to/server-ca.pem
  sql: |
    path: postgresql://postgres:mysecretpassword@127.0.0.1:55001/feast
    cache_ttl_seconds: 60
    sqlalchemy_config_kwargs:
        echo: false
        pool_pre_ping: true
type: Opaque

Which issue(s) this PR fixes:

Relates to https://github.com/feast-dev/feast/issues/4783

dmartinol commented 2 days ago

@tmihalac the issue you are referring to is already closed. @tchughesiv should we create a new one or reopen it?

dmartinol commented 2 days ago

In the description, the postgres type is not supported by registry, pls change it to sql (and also add a sql key to the secret name)

    registry:
      local:
        persistence:
          store:
          type: postgres
tchughesiv commented 1 day ago

@tmihalac @dmartinol we should be opening new issues for operator PRs

tchughesiv commented 15 hours ago

@tmihalac please open a new gh issue for this PR

tchughesiv commented 15 hours ago

@tmihalac should your descrip example be fixed? i'd imagine it will look like this? with the secretKeyName pulled back to under store?

kind: FeatureStore
metadata:
  name: sample-s3-registry
spec:
  feastProject: my_project
  services:
    onlineStore:
      persistence:
        store:
          type: postgres
          secretRef: 
            name: _SECRET_NAME_ # Secret keys should be placed as-is under the `type` (e.g postgres) key or under the secretKeyName if specified
          secretKeyName: my-postgres # The secret key the db parameters are in (optional parameter)
tmihalac commented 15 hours ago

@tmihalac should your descrip example be fixed? i'd imagine it will look like this? with the secretKeyName pulled back to under store?

kind: FeatureStore
metadata:
  name: sample-s3-registry
spec:
  feastProject: my_project
  services:
    onlineStore:
      persistence:
        store:
          type: postgres
          secretRef: 
            name: _SECRET_NAME_ # Secret keys should be placed as-is under the `type` (e.g postgres) key or under the secretKeyName if specified
          secretKeyName: my-postgres # The secret key the db parameters are in (optional parameter)

You are right fixing it now

tmihalac commented 15 hours ago

Done