Skip to content

Commit

Permalink
docs: Doc fixes (#469)
Browse files Browse the repository at this point in the history
Signed-off-by: James Milligan <james@omnant.co.uk>
  • Loading branch information
james-milligan authored Apr 14, 2023
1 parent ea98e1e commit 5a7918a
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 40 deletions.
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Configuration of the deployed sidecars is handled through the `FeatureFlagConfig
- [FlagSourceConfiguration](./flag_source_configuration.md)

## Other Resources
- [Architecture](./architecture.md)
- [Permissions](./permissions.md)
- [Development Notes](./development_notes.md)
- [flagd Kube Proxy](./flagd_proxy.md)
1 change: 1 addition & 0 deletions docs/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ This annotation is used to mark pods which should have their permissions backfil

### `openfeature.dev/featureflagconfiguration`
*This annotation is DEPRECATED in favour of the `openfeature.dev/flagsourceconfiguration` annotation and should no longer be used.*

This annotation specifies the names of the FeatureFlagConfigurations used to configure the injected flagd sidecar.
The annotation value is a comma separated list of values following one of 2 patterns: {NAME} or {NAMESPACE}/{NAME}.
If no namespace is provided it is assumed that the CR is within the same namespace as the deployed pod.
Expand Down
6 changes: 0 additions & 6 deletions docs/architecture.md

This file was deleted.

34 changes: 1 addition & 33 deletions docs/flag_source_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The injected sidecar is configured using the `FlagSourceConfiguration` CRD, the
```
In this example, 2 CRs are being used to configure the injected container (by default the operator uses the `flagd:main` image), `config-A` (which is assumed to be in the namespace `test-ns`) and `config-B` from the `test-ns-2` namespace, with `config-B` taking precedence in the configuration merge.

The `FlagSourceConfiguration` version `v1alpha3` CRD defines a CR with the following example structure:
The `FlagSourceConfiguration` version `v1alpha3` CRD defines a CR with the following example structure, the documentation for this CRD can be found [here](crds.md#flagsourceconfiguration):

```yaml
apiVersion: core.openfeature.dev/v1alpha3
Expand Down Expand Up @@ -39,38 +39,6 @@ spec:
The relevant `FlagSourceConfigurations` are passed to the operator by setting the `openfeature.dev/flagsourceconfiguration` annotation, and is responsible for providing the full configuration of the injected sidecar.

## FlagSourceConfiguration Fields

| Field | Behavior | Type | Default |
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|------------------------------|
| MetricsPort | Defines the port for flagd to serve metrics on | optional `int32` | `8013` |
| Port | Defines the port for flagd to listen on | optional `int32` | `8014` |
| SocketPath | Defines the unix socket path to listen on | optional `string` | `""` |
| SyncProviderArgs | String arguments passed to the sidecar on startup, flagd documentation can be found [here](https://github.com/open-feature/flagd/blob/main/docs/configuration/configuration.md) | optional `array of strings`, key values separated by `=`, e.g `key=value` | `""` |
| Image | Allows for the sidecar image to be overridden | optional `string` | `ghcr.io/open-feature/flagd` |
| Tag | Tag to be appended to the sidecar image | optional `string` | `main` |
| Sources | An array of objects defining configuration and sources for each sync provider to use within flagd, documentation of the object is directly below this table | optional `array of objects` | `[]` |
| EnvVars | An array of environment variables to be applied to the sidecar, all names become prepended with the EnvVarPrefix | optional `array of environment variables` | `[]` |
| EnvVarPrefix | String value defining the prefix to be applied to all environment variables applied to the sidecar | optional `string` | `FLAGD` |
| DefaultSyncProvider | Defines the default provider to be used, can be set to `kubernetes`, `filepath`, `http` or `flagd-proxy` (experimental). | optional `string` | `kubernetes` |
| RolloutOnChange | When set to true the operator will trigger a restart of any `Deployments` within the `FlagSourceConfiguration` reconcile loop, updating the injected sidecar with the latest configuration. | optional `boolean` | `false` |
| ProbesEnabled | Enable or disable Liveness and Readiness probes of the flagd sidecar. When enabled, HTTP probes( paths - `/readyz`, `/healthz`) are set with an initial delay of 5 seconds | optional `boolean` | `true` |
| DebugLogging | Enable or disable `--debug` flag of flagd sidecar | optional `boolean` | `false` |

## Source Fields

| Field | Behavior | Type |
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
| Source | Defines the URI of the flag source, this can be either a `host:port` or the `namespace/name` of a `FeatureFlagConfiguration` | `string` |
| Provider | Defines the provider to be used, can be set to `kubernetes`, `filepath`, `http(s)` or `grpc(s)`. If not provided the default sync provider is used. | optional `string` |
| HttpSyncBearerToken | Defines the bearer token to be used with a `http` sync. Has no effect if `Provider` is not `http` | optional `string` |
| TLS | Enable/Disable secure TLS connectivity. Currently used only by GRPC sync | optional `string` |
| CertPath | Defines the certificate path to be used by grpc TLS connectivity. Has no effect on other `Provider` types | optional `string` |
| ProviderID | Defines the identifier for grpc connection. Has no effect on other `Provider` types | optional `string` |
| Selector | Defines the flag configuration selection criteria for grpc connection. Has no effect on other `Provider` types | optional `string` |

> The flagd-proxy provider type is experimental, documentation can be found [here](./flagd_proxy.md)

## Configuration Merging

When multiple `FlagSourceConfigurations` are provided, the configurations are merged. The last `CR` takes precedence over the first, with any configuration from the deprecated `FlagDSpec` field of the `FeatureFlagConfiguration` CRD taking the lowest priority.
Expand Down
File renamed without changes

0 comments on commit 5a7918a

Please sign in to comment.