Skip to content

Commit 6531813

Browse files
authored
Merge pull request #31 from toddbaert/update-readme
Update README: REST endpoint and submodule
2 parents 1e0c27e + 7aa7554 commit 6531813

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,17 @@ metadata:
3232
spec:
3333
featureFlagSpec: |
3434
{
35-
"foo" : "bar"
35+
"stringFlags": {
36+
"foo": {
37+
"state": "enabled",
38+
"variants": {
39+
"bar": "BAR",
40+
"baz": "BAZ"
41+
},
42+
"defaultVariant": "bar",
43+
"rules": []
44+
}
45+
}
3646
}
3747
```
3848

@@ -57,15 +67,21 @@ spec:
5767
3. Example usage from host container
5868

5969
```
60-
root@nginx:/# curl localhost:8080
61-
{
62-
"foo" : "bar"
63-
}
70+
root@nginx:/# curl -X POST localhost:8080/flags/foo/resolve/string?default-value=default
71+
{"reason":"DEFAULT","value":"BAR"}
6472
```
6573

6674
### Running the operator locally
6775

68-
1. Create a local cluster with MicroK8s or Kind
76+
#### Pull the "schemas" submodule
77+
78+
1. `git submodule update --init --recursive`
79+
80+
Note: you can update the submodule with `git submodule update --recursive --remote`
81+
82+
#### Create a local cluster with cert manager and our operator
83+
84+
1. Create a local cluster with MicroK8s or Kind (forward requests from your localhost:30000 to your cluster, see MicroK8s/Kind doc)
6985
1. `kubectl create ns 'open-feature-operator-system'`
7086
1. `kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.yaml`
7187
1. `kubectl apply -f config/webhook/certificate.yaml`
@@ -74,4 +90,6 @@ root@nginx:/# curl localhost:8080
7490
#### Run the example
7591

7692
1. Apply the end-to-end example: `kubectl apply -f config/samples/end-to-end.yaml`
93+
1. Visit `http://localhost:30000/`
7794
1. Update the value of the `defaultVariant` field in the custom resource instance in `config/samples/end-to-end.yaml` and re-apply to update the flag value!
95+
1. Visit `http://localhost:30000/` and see the change!

0 commit comments

Comments
 (0)