Skip to content

Commit e9cb659

Browse files
docs: automated demo deployment (#310)
Signed-off-by: James Milligan <[email protected]>
1 parent dbfea97 commit e9cb659

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ deploy-operator:
139139
make deploy
140140
kubectl wait --for=condition=Available=True deploy --all -n 'open-feature-operator-system'
141141

142+
deploy-demo:
143+
kubectl apply -f https://raw.githubusercontent.com/open-feature/playground/main/config/k8s/end-to-end.yaml
144+
kubectl wait -l app=open-feature-demo --for=condition=Available=True deploy
145+
kubectl port-forward service/open-feature-demo-service 30000:30000
146+
147+
delete-demo-deployment:
148+
kubectl delete -f https://raw.githubusercontent.com/open-feature/playground/main/config/k8s/end-to-end.yaml
149+
142150
##@ Build Dependencies
143151

144152
## Location to install dependencies to

docs/getting_started.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
Once you have [installed the operator](./installation.md) you can follow this guide to deploy an example application demonstrating the operator.
44

5+
## Quick start
6+
7+
### Deploy the demo app
8+
9+
To get started with the operator you can deploy our e2e example using the [playground app](https://github.com/open-feature/playground)
10+
To deploy the example, run the following command:
11+
```sh
12+
make deploy-demo
13+
```
14+
This command deploys the demo app to the `open-feature-demo` namespace, and once it enters a `Ready` state, will start port-forwarding to the deployed `service/open-feature-demo-service`. Once the log line `Forwarding from 127.0.0.1:30000 -> 30000` is printed, the application is available at [`127.0.0.1:30000`](127.0.0.1:30000).
15+
16+
To update the flag configurations first request the deployed yaml from the cluster, writing it to a file:
17+
```
18+
kubectl get featureflagconfigurations.core.openfeature.dev end-to-end -o yaml > my-flag-configuration.yaml
19+
```
20+
This file can then be edited and re-applied to the cluster, resulting in the changes being reflected by the demo application. As an example, change the `defaultVariant` for the `hex-color` flag from `"blue"` to `"green"`.
21+
Run `kubectl apply -f my-flag-configuration.yaml` to apply these changes to the cluster, this will result in the background color of the demo app changing to green when the `flagd` provider is selected.
22+
23+
### Uninstall the demo app
24+
25+
To uninstall the demo app from your cluster, run the following command:
26+
```
27+
make delete-demo-deployment
28+
```
29+
30+
## Deploy your own application
31+
532
### Deploy a `FeatureFlagConfiguration`
633

734
This `FeatureFlagConfiguration` is watched by the injected `flagd` container and used to construct its internal flag definitions state. If multiple configurations are supplied to `flagd` these states will be merged.

0 commit comments

Comments
 (0)