Skip to content

Commit

Permalink
feat: libsql updates
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Oct 20, 2023
1 parent b6c70cb commit 9bca27c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 31 deletions.
26 changes: 13 additions & 13 deletions configuration/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,19 @@ These properties are as follows:

### Database

| Property | Description | Default | Since |
| ------------------------------ | ------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------- |
| db.url | URL to access Flipt database | file:/(OS Dependent)/flipt/flipt.db | v1.26.0 \*OS Dependent |
| db.protocol | Protocol (SQLite, MySQL, PostgreSQL, CockroachDB) for Flipt database (URL takes precedence) | | v0.18.0 |
| db.host | Host to access Flipt database (URL takes precedence) | | v0.18.0 |
| db.port | Port to access Flipt database (URL takes precedence) | | v0.18.0 |
| db.name | Name of Flipt database (URL takes precedence) | | v0.18.0 |
| db.user | User to access Flipt database (URL takes precedence) | | v0.18.0 |
| db.password | Password to access Flipt database (URL takes precedence) | | v0.18.0 |
| db.max_idle_conn | The maximum number of connections in the idle connection pool | 2 | v0.17.0 |
| db.max_open_conn | The maximum number of open connections to the database | unlimited | v0.17.0 |
| db.conn_max_lifetime | Sets the maximum amount of time in which a connection can be reused | unlimited | v0.17.0 |
| db.prepared_statements_enabled | Enable or disable prepared statements for database queries | true | v1.23.1 |
| Property | Description | Default | Since |
| ------------------------------ | ------------------------------------------------------------------- | ----------------------------------- | ---------------------- |
| db.url | URL to access Flipt database | file:/(OS Dependent)/flipt/flipt.db | v1.26.0 \*OS Dependent |
| db.protocol | Protocol for Flipt database (URL takes precedence) | | v0.18.0 |
| db.host | Host to access Flipt database (URL takes precedence) | | v0.18.0 |
| db.port | Port to access Flipt database (URL takes precedence) | | v0.18.0 |
| db.name | Name of Flipt database (URL takes precedence) | | v0.18.0 |
| db.user | User to access Flipt database (URL takes precedence) | | v0.18.0 |
| db.password | Password to access Flipt database (URL takes precedence) | | v0.18.0 |
| db.max_idle_conn | The maximum number of connections in the idle connection pool | 2 | v0.17.0 |
| db.max_open_conn | The maximum number of open connections to the database | unlimited | v0.17.0 |
| db.conn_max_lifetime | Sets the maximum amount of time in which a connection can be reused | unlimited | v0.17.0 |
| db.prepared_statements_enabled | Enable or disable prepared statements for database queries | true | v1.23.1 |

### Storage

Expand Down
47 changes: 29 additions & 18 deletions configuration/storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ description: This document describes how to configure Flipt's storage backend me

## Databases

Flipt supports [SQLite](https://www.sqlite.org/index.html), [PostgreSQL](https://www.postgresql.org/), [CockroachDB](https://www.cockroachlabs.com/) and
[MySQL](https://dev.mysql.com/) databases.
Flipt supports [SQLite](https://www.sqlite.org/index.html), [PostgreSQL](https://www.postgresql.org/), [CockroachDB](https://www.cockroachlabs.com/) and [MySQL](https://dev.mysql.com/) databases.

SQLite is enabled by default for simplicity, however, you should use PostgreSQL, MySQL, or CockroachDB if you intend to run multiple copies of Flipt in a high
availability configuration.
<Note>
As of [v1.29.0](https://github.com/flipt-io/flipt/releases/tag/v1.29.0), Flipt
also supports [libSQL](https://github.com/tursodatabase/libsql) which is a
fork of SQLite that can be accessed over a network via
[sqld](https://github.com/tursodatabase/libsql/tree/main/libsql-server).
</Note>

<Warning>
All databases except for SQLite must exist and be up and running before Flipt
will be able to connect to it.
</Warning>
SQLite is enabled by default for simplicity, however, you should use PostgreSQL, MySQL, or CockroachDB if you intend to run multiple copies of Flipt in a high availability configuration.

The database connection can be configured as follows:

Expand All @@ -32,6 +32,26 @@ db:
url: file:/var/opt/flipt/flipt.db
```
### LibSQL
See our [libSQL Example](https://github.com/flipt-io/flipt/blob/main/examples/database/libsql) for a working example of how to use libSQL with Flipt.
#### Local
```yaml
db:
# libsql: informs flipt to use libSQL
url: libsql://file:/var/opt/flipt/flipt.db
```
#### Remote
````yaml
db:
# http(s): informs flipt to use libSQL over HTTP(s) via sqld
url: http://db-[your-github-name].turso.io
```

### PostgreSQL

```yaml
Expand Down Expand Up @@ -91,11 +111,6 @@ when the migration container exits, having no effect on your Flipt instance!

## Filesystem

<Note>
This feature was added as an experiment in Flipt `v1.23.0` and officially
supported in Flipt `v1.25.0`.
</Note>

The following backend types are designed to support declarative management of feature flag state.
In particular, they're designed to support GitOps practices with minimal external dependencies.

Expand Down Expand Up @@ -213,11 +228,6 @@ See our [GitOps Guide](/guides/get-going-with-gitops) for an example of how to s

### Object

<Note>
This feature was added as an experiment in Flipt `v1.24.0` and officially
supported in Flipt `v1.25.0`.
</Note>

The object storage type supports using a hosted object storage service as the source of truth for Flipt state configuration.
Currently, Flipt supports the [S3 API](https://aws.amazon.com/s3/) as a backend. This means the AWS S3 and open-source alternatives such as [Minio](https://github.com/minio/minio) can be leveraged as Flipt backends.

Expand Down Expand Up @@ -435,3 +445,4 @@ cache:
memory:
eviction_interval: 2m # expired items will be evicted from the cache every 2 minutes
```
````

0 comments on commit 9bca27c

Please sign in to comment.