Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document new feature flags #2541

Merged
merged 3 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

* [GraphQL API](administering-lagoon/graphql-queries.md)
* [Role-Based Access Control \(RBAC\)](administering-lagoon/rbac.md)
* [Feature Flags](administering-lagoon/feature-flags.md)
* [Harbor](administering-lagoon/using_harbor/README.md)
* [Security Scanning](administering-lagoon/using_harbor/security_scanning.md)
* [Harbor Settings](administering-lagoon/using_harbor/harbor-settings/README.md)
Expand Down
23 changes: 23 additions & 0 deletions docs/administering-lagoon/feature-flags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Feature flags

Some Lagoon features can be controlled by setting feature flags.
This is designed to assist users and administrators to roll out new platform features in a controlled manner.

## Environment variables

The following environment variables can be set on an environment or project to toggle feature flags.

| Environment Variable Name | Active scope\* | Version introduced | Version removed | Default Value | Description |
| --- | --- | --- | --- | --- | --- |
| `LAGOON_FEATURE_FLAG_ROOTLESS_WORKLOAD` | `build` | 2.0.0 | - | `disabled` | Set to `enabled` to set a non-root pod securty context on the pods in this environment or project.<br><br>This flag will eventually be deprecated, at which point non-root workloads will be enforced. |
tobybellwood marked this conversation as resolved.
Show resolved Hide resolved
| `LAGOON_FEATURE_FLAG_ISOLATION_NETWORK_POLICY` | `build` | 2.0.0 | - | `disabled` | Set to `enabled` to add a default namespace isolation network policy to each environment on deployment.<br><br>This flag will eventually be deprecated, at which point the namespace isolation network policy will be enforced.<br><br>NOTE: enabling and then disabling this feature will _not_ remove any existing network policy from previous deployments. Those must be removed manually. |

\* Active scope indicates whether the variable must be set as `build` or `runtime` scope to take effect. `global` sets the variable in both scopes, so that will work too.

## Cluster-level controls

Feature flags may also be controlled at the cluster level. There is support for this in the [`lagoon-build-deploy` chart](https://github.com/uselagoon/lagoon-charts/blob/main/charts/lagoon-build-deploy/values.yaml).
For each feature flag there are two flavours of values which can be set: `default` and `force`.

* `default` controls the default policy for environments deployed to the cluster, but can be overridden at the project or environment level by the environment variables documented above.
* `force` also controls the policy for environments deployed to the cluster, but _cannot be overridden_ by the environment variables documented above.