Skip to content

Commit 7a57bf0

Browse files
committed
Using ghcr.io/open-feature
1 parent 069112c commit 7a57bf0

File tree

6 files changed

+75
-71
lines changed

6 files changed

+75
-71
lines changed

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,5 @@ root@nginx:/# curl localhost:8080
7373

7474
#### Run the example
7575

76-
<<<<<<< HEAD
77-
1. `kubectl apply -f config/samples/crds/featureflagconfiguration.yaml`
78-
1. `kubectl apply -f config/samples/pod.yaml`
79-
=======
80-
1. Add our CR: `kubectl apply -f config/samples/end-to-end/crd/end-to-end.yml`
81-
1. Add test deployment: `kubectl apply -f config/samples/end-to-end/deployment/openfeature-nest-example.yml`
82-
1. Add service (optional): `kubectl apply -f config/samples/end-to-end/service/openfeature-nest-example.yml`
83-
>>>>>>> 5f8ddf3 (Add submodule for schemas, embed in utils)
76+
1. Apply the end-to-end example: `kubectl apply -f config/samples/end-to-end.yaml`
77+
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!

config/manager/kustomization.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
resources:
2-
- manager.yaml
2+
- manager.yaml
33

44
generatorOptions:
55
disableNameSuffixHash: true
66

77
configMapGenerator:
8-
- files:
9-
- controller_manager_config.yaml
10-
name: manager-config
8+
- files:
9+
- controller_manager_config.yaml
10+
name: manager-config
1111
apiVersion: kustomize.config.k8s.io/v1beta1
1212
kind: Kustomization
1313
images:
14-
- name: controller
15-
newName: controller
16-
newTag: latest
14+
- name: controller
15+
newName: controller
16+
newTag: latest

config/samples/end-to-end.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# A basic flag custom resource
2+
3+
apiVersion: core.openfeature.dev/v1alpha1
4+
kind: FeatureFlagConfiguration
5+
metadata:
6+
name: end-to-end
7+
spec:
8+
featureFlagSpec: |
9+
{
10+
"booleanFlags": {
11+
"new-welcome-message": {
12+
"state": "enabled",
13+
"variants": {
14+
"enabled": true,
15+
"disabled": false
16+
},
17+
"defaultVariant": "enabled",
18+
"rules": []
19+
}
20+
}
21+
}
22+
23+
---
24+
# Deployment of a demo-app using our custom resource
25+
26+
apiVersion: apps/v1
27+
kind: Deployment
28+
metadata:
29+
name: openfeature-nest-example-deployment
30+
labels:
31+
app: openfeature-nest-example
32+
spec:
33+
replicas: 3
34+
selector:
35+
matchLabels:
36+
app: openfeature-nest-example
37+
template:
38+
metadata:
39+
labels:
40+
app: openfeature-nest-example
41+
annotations:
42+
openfeature.dev: "enabled"
43+
openfeature.dev/featureflagconfiguration: "end-to-end"
44+
spec:
45+
containers:
46+
- name: openfeature-nest-example
47+
image: ghcr.io/open-feature/open-feature-nest-example:latest
48+
ports:
49+
- containerPort: 3000
50+
51+
---
52+
# Service exposed using NodePort
53+
54+
apiVersion: v1
55+
kind: Service
56+
metadata:
57+
name: openfeature-nest-example-service
58+
spec:
59+
type: NodePort
60+
selector:
61+
app: openfeature-nest-example
62+
ports:
63+
# By default and for convenience, the `targetPort` is set to the same value as the `port` field.
64+
- port: 30000
65+
targetPort: 3000
66+
nodePort: 30000

config/samples/end-to-end/crd/end-to-end.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

config/samples/end-to-end/deployment/openfeature-nest-example.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

config/samples/end-to-end/service/openfeature-nest-example.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)