Skip to content

Commit

Permalink
Merge branch 'main' into add-template-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps authored Oct 2, 2023
2 parents 216705f + 66acbee commit 0887fbe
Show file tree
Hide file tree
Showing 26 changed files with 711 additions and 241 deletions.
13 changes: 7 additions & 6 deletions .vale/styles/Flipt/spelling-exceptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ boolean
caddy
codeowners
codespaces
darwin
datetime
declaratively
deletable
Expand All @@ -14,7 +15,9 @@ dev
dex
flipt
flipt's
Gitlab
grafana
hostname
http
httplug
https
Expand All @@ -28,6 +31,7 @@ mintlify
namespace
namespaces
nginx
ngrok
oauth
oidc
okta
Expand All @@ -37,21 +41,18 @@ PGBouncer
postgres
protobuf
protoc
Quicksort
redis
regexes
rflipt
rollout
rollouts
SCMs
sdk
sdks
sqlite
unary
uncomment
URIs
yaml
zipkin
Quicksort
SCMs
Gitlab
ngrok
hostname
zipkin
2 changes: 1 addition & 1 deletion authentication/methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ curl -X POST localhost:8080/auth/v1/method/token \

#### UI

As of version 1.19.0, the UI also supports the creation and deletion of tokens. To access this functionality, navigate to `Settings` from the main menu and see the 'Static Tokens' section.
The UI also supports the creation and deletion of tokens. To access this functionality, navigate to `Settings` from the main menu and see the 'Static Tokens' section.

![Create Token UI](/images/authentication/create-token.png)

Expand Down
24 changes: 24 additions & 0 deletions cli/commands/config/edit.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "config edit"
description: "Edit Flipt configuration"
---

```
flipt config edit [flags]
```

### Options

```
-h, --help help for edit
```

### Inherited Options

```
--config string path to config file
```

### More Info

See the [configuration](/configuration) section of the documentation for more information.
25 changes: 25 additions & 0 deletions cli/commands/config/init.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "config init"
description: "Initialize Flipt configuration"
---

```
flipt config init [flags]
```

### Options

```
-y, --force Overwrite existing configuration file
-h, --help help for init
```

### Inherited Options

```
--config string path to config file
```

### More Info

See the [configuration](/configuration) section of the documentation for more information.
24 changes: 24 additions & 0 deletions cli/commands/export.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "export"
description: "Export Flipt data to file/stdout"
---

```
flipt export [flags]
```

### Options

```
-a, --address string address of remote Flipt instance to export from (defaults to direct DB export if not supplied)
--all-namespaces export all namespaces. (mutually exclusive with --namespaces)
--config string path to config file
-h, --help help for export
--namespaces string comma-delimited list of namespaces to export from. (mutually exclusive with --all-namespaces) (default "default")
-o, --output string export to filename (default STDOUT)
-t, --token string client token used to authenticate access to remote Flipt instance when exporting.
```

### More Info

See the [import/export](/operations/import-export) section of the documentation for more information.
23 changes: 23 additions & 0 deletions cli/commands/import.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "import"
description: "Import Flipt data from file/stdin"
---

```
flipt import [flags]
```

### Options

```
-a, --address string address of remote Flipt instance to import into (defaults to direct DB import if not supplied)
--config string path to config file
--drop drop database before import
-h, --help help for import
--stdin import from STDIN
-t, --token string client token used to authenticate access to remote Flipt instance when importing.
```

### More Info

See the [import/export](/operations/import-export) section of the documentation for more information.
19 changes: 19 additions & 0 deletions cli/commands/migrate.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "migrate"
description: "Run pending database migrations"
---

```
flipt migrate [flags]
```

### Options

```
--config string path to config file
-h, --help help for migrate
```

### More Info

See the [migrations](/configuration/storage#migrations) section of the documentation for more information.
20 changes: 20 additions & 0 deletions cli/commands/validate.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "validate"
description: "Validate Flipt flag state (.yaml, .yml) files"
---

```
flipt validate [flags]
```

### Options

```
-F, --format string output format: json, text (default "text")
-h, --help help for validate
--issue-exit-code int Exit code to use when issues are found (default 1)
```

### More Info

See the [flag state](/configuration/storage#flag-state-configuration) section of the documentation for more information.
44 changes: 44 additions & 0 deletions cli/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: "Overview"
description: "Overview of the flipt CLI"
---

The `flipt` CLI is a command line interface for managing Flipt. It's useful for configuring your Flipt instance, running migrations, validating `.features.yml` files, and more.

You can use it in various environments, including your local machine, CI/CD, and more.

### Installation

<CodeGroup>
```console Homebrew
brew install flipt-io/brew/flipt
```

```console Binary
curl -fsSL https://github.com/flipt-io/flipt/raw/main/install.sh | bash
```

</CodeGroup>

### Usage

```
flipt <command> <subcommand> [flags]
```

`flipt` with no arguments will run the Flipt server. It will look for a configuration file as described in the [configuration](/configuration/overview#configuration-file) documentation. You can specify a different configuration file with the `--config` flag.

### Examples

```
$ flipt
$ flipt config init
$ flipt --config /path/to/config.yml migrate
```

### Options

```
--config string path to config file
-h, --help help for flipt
```
2 changes: 1 addition & 1 deletion concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ More information on how to use Flipt is noted in the [Getting Started](/introduc

## Namespaces

Namespaces are the recommended way to organize all of the resources such as Flags, Segments, Rules, etc within Flipt as of [v1.20.0](https://github.com/flipt-io/flipt/releases/tag/v1.20.0).
Namespaces are the recommended way to organize all resources such as Flags, Segments, Rules, etc within Flipt.

Namespaces allow you to separate all data within Flipt for use in different environments such as Development, Staging, Production, etc.

Expand Down
20 changes: 18 additions & 2 deletions configuration/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ go_gc_duration_seconds{quantile="1"} 0.00026651 go_gc_duration_seconds_sum
0.000402094 go_gc_duration_seconds_count 5
```

An [example](https://github.com/flipt-io/flipt/tree/main/examples/prometheus)
An [example](https://github.com/flipt-io/flipt/tree/main/examples/metrics)
showing how to set up Flipt with Prometheus can be found in the GitHub repository.

### Dashboards

![Grafana Dashboard](/images/configuration/grafana_flag_dashboard.png)

We provide created a set of [Grafana](https://grafana.com/) dashboards that you can use to visualize the metrics collected by Flipt, including both server health and flag evaluation metrics.
We provide a set of [Grafana](https://grafana.com/) dashboards that you can use to visualize the metrics collected by Flipt, including both server health and flag evaluation metrics.

You can find the dashboards in our [grafana-dashboards](https://github.com/flipt-io/grafana-dashboards) repository.

Expand All @@ -48,6 +48,22 @@ Enable tracing via the values described in the [Tracing configuration](/configur

[Examples](https://github.com/flipt-io/flipt/tree/main/examples/tracing) showing how to set up Flipt with each of the supported tracing backends can be found in the main GitHub repository .

### OTLP

OTLP supports additional configuration such as specifying the protocol to use (gRPC or HTTP) as well as providing custom headers to send with the request.

Custom headers can be used to provide authentication information to the collector which may be required if you are using a hosted collector such as [NewRelic](https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-set-up-your-app/), [DataDog](https://docs.datadoghq.com/opentelemetry/otlp_ingest_in_the_agent/?tab=host), or [Honeycomb](https://docs.honeycomb.io/getting-data-in/opentelemetry-overview/#instrumenting-with-opentelemetry).

These can be configured via the `tracing.otlp` configuration section.

```yaml
tracing:
otlp:
endpoint: "https://{your-collector-url}"
headers:
"X-Some-Header": "some-value"
```
## Audit Events
Flipt supports sending audit events to configured sinks. Audit events have the following structure:
Expand Down
27 changes: 13 additions & 14 deletions configuration/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Overview
description: This document describes how to configure the Flipt server.
---

`Flipt` server can be configured in two ways.
Flipt server can be configured in two ways.

Configuration precedence is as follows:

Expand All @@ -18,30 +18,28 @@ The default way that Flipt is configured is with the use of a configuration file
This file is read when Flipt starts up and configures several important
properties for the server.

As of version [v1.23](https://github.com/flipt-io/flipt/releases/tag/v1.23.0), the server will check in a few different locations for server configuration (in order):
<Tip>
You can generate a default configuration file by running `flipt config init`
as of v1.28.0. See the [CLI](/cli) documentation for more information.
</Tip>

The server will check in a few different locations for server configuration (in order):

1. `--config` flag as an override
2. `{{ USER_CONFIG_DIR }}/flipt/config.yml` (the `USER_CONFIG_DIR` value is based on your architecture and specified in the [Go documentation](https://pkg.go.dev/os#UserConfigDir))
3. `/etc/flipt/config/default.yml`

<Tip>
<Note>
We provide both a [JSON
schema](https://raw.githubusercontent.com/flipt-io/flipt/main/config/flipt.schema.json)
and a [Cue
schema](https://raw.githubusercontent.com/flipt-io/flipt/main/config/flipt.schema.cue)
that you can use to validate your configuration file and it's properties.
</Tip>
</Note>

You can edit any of these properties to your liking, and on restart Flipt will
pick up the new changes.

<Note>
These defaults are commented out in
[default.yml](https://github.com/flipt-io/flipt/blob/main/config/default.yml)
to give you an idea of what they are. To change them you'll first need to
uncomment them.
</Note>

These properties are as follows:

### General
Expand Down Expand Up @@ -272,9 +270,10 @@ These properties are as follows:

#### Tracing: OTLP

| Property | Description | Default | Since |
| --------------------- | ------------------------------ | -------------- | ------- |
| tracing.otlp.endpoint | The OTLP GRPC receiver address | localhost:4317 | v1.18.2 |
| Property | Description | Default | Since |
| --------------------- | ----------------------------------------------------------------- | --------------------- | ------- |
| tracing.otlp.endpoint | The OTLP receiver address (supports: grpc, http, https) | grpc://localhost:4317 | v1.18.2 |
| tracing.otlp.headers | Additional headers to send with OTLP requests (map[string]string) | | v1.28.0 |

## Deprecations

Expand Down
2 changes: 1 addition & 1 deletion configuration/telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ meta:
export FLIPT_META_TELEMETRY_ENABLED=false
```

As of [v1.21.0](https://github.com/flipt-io/flipt/releases/tag/v1.21.0), telemetry can also be disabled by setting the [DO_NOT_TRACK](https://consoledonottrack.com/) environment variable to `true` or `1`:
Telemetry can also be disabled by setting the [DO_NOT_TRACK](https://consoledonottrack.com/) environment variable to `true` or `1`:

```shell
export DO_NOT_TRACK=true
Expand Down
13 changes: 13 additions & 0 deletions images/integration/openfeature-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0887fbe

Please sign in to comment.