mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 20:02:37 +00:00
add support for postgres ssl mode and root cert
This commit is contained in:
parent
5e7c2250be
commit
85637f3c89
2 changed files with 4 additions and 0 deletions
|
|
@ -75,6 +75,8 @@ class PostgresKVStoreConfig(CommonConfig):
|
|||
db: str = "llamastack"
|
||||
user: str
|
||||
password: str | None = None
|
||||
ssl_mode: str | None = None
|
||||
ssl_root_cert: str | None = None
|
||||
table_name: str = "llamastack_kvstore"
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ class PostgresKVStoreImpl(KVStore):
|
|||
database=self.config.db,
|
||||
user=self.config.user,
|
||||
password=self.config.password,
|
||||
sslmode=self.config.ssl_mode,
|
||||
sslrootcert=self.config.ssl_root_cert,
|
||||
)
|
||||
self.conn.autocommit = True
|
||||
self.cursor = self.conn.cursor(cursor_factory=DictCursor)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue