Compare commits
No commits in common. "main" and "v0.15.2" have entirely different histories.
|
@ -28,9 +28,6 @@ FLAGSMITH_ENV_KEY=
|
|||
# Harness SDK Key
|
||||
HARNESS_KEY=
|
||||
|
||||
# ConfigCat SDK Key
|
||||
CONFIGCAT_SDK_KEY=
|
||||
|
||||
###############################################
|
||||
##
|
||||
## Feature Flag SDK keys (web)
|
||||
|
@ -62,7 +59,4 @@ FLAGD_PORT_WEB=
|
|||
|
||||
# Determines if TLS (https) should be used
|
||||
# @default false
|
||||
FLAGD_TLS_WEB=
|
||||
|
||||
# ConfigCat SDK Key
|
||||
CONFIGCAT_SDK_KEY_WEB=
|
||||
FLAGD_TLS_WEB=
|
|
@ -7,27 +7,20 @@ on:
|
|||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
merge_group:
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: equinix-4cpu-16gb
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
||||
- uses: nrwl/nx-set-shas@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
# Mark your git directory as safe for self-hosted runners
|
||||
# https://github.com/nrwl/nx-set-shas?tab=readme-ov-file#self-hosted-runners
|
||||
- name: Set Directory as Safe
|
||||
run: |
|
||||
git config --add safe.directory "$GITHUB_WORKSPACE"
|
||||
shell: bash
|
||||
- uses: nrwl/nx-set-shas@e2e6dc8bce4b0387a05eb687735c39c41580b792 # v4
|
||||
- run: npm ci
|
||||
- run: npx nx affected --target=lint --parallel=3
|
||||
- run: npx nx affected --target=build --parallel=3 --ci
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
# based on https://github.com/onnx/onnx/blob/main/.github/workflows/dco_merge_group.yml
|
||||
|
||||
name: DCO
|
||||
on:
|
||||
merge_group:
|
||||
|
||||
permissions: # set top-level default permissions as security best practice
|
||||
contents: read # Check https://github.com/ossf/scorecard/blob/7ce8609469289d5f3b1bf5ee3122f42b4e3054fb/docs/checks.md#token-permissions
|
||||
|
||||
jobs:
|
||||
DCO:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor != 'dependabot[bot]' }}
|
||||
steps:
|
||||
- run: echo "dummy DCO workflow (it won't run any check actually) to trigger by merge_group in order to enable merge queue"
|
|
@ -12,6 +12,6 @@ jobs:
|
|||
name: Validate PR title
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5
|
||||
- uses: amannn/action-semantic-pull-request@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
@ -13,13 +13,12 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
# Release-please creates a PR that tracks all changes
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 # v3
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
id: release
|
||||
with:
|
||||
command: manifest
|
||||
token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}}
|
||||
token: ${{secrets.GITHUB_TOKEN}}
|
||||
default-branch: main
|
||||
signoff: "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>"
|
||||
outputs:
|
||||
release_created: ${{ steps.release.outputs.release_created }}
|
||||
release_tag_name: ${{ steps.release.outputs.tag_name }}
|
||||
|
@ -30,12 +29,12 @@ jobs:
|
|||
if: ${{ needs.release-please.outputs.release_created }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ needs.release-please.outputs.release_tag_name }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
|
@ -43,7 +42,7 @@ jobs:
|
|||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
|
@ -52,15 +51,15 @@ jobs:
|
|||
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
- name: Build App Container
|
||||
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./packages/app/Dockerfile
|
||||
|
@ -77,7 +76,7 @@ jobs:
|
|||
DATE=${{ steps.date.outputs.date }}
|
||||
|
||||
- name: Build Fibonacci Service Container
|
||||
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./packages/fibonacci-service/Dockerfile
|
||||
|
|
|
@ -45,5 +45,3 @@ Thumbs.db
|
|||
# yalc stuff
|
||||
.yalc
|
||||
yalc.lock
|
||||
|
||||
config/flipt/flipt.db
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
".": "0.16.0"
|
||||
".": "0.15.2"
|
||||
}
|
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,17 +1,5 @@
|
|||
# Changelog
|
||||
|
||||
## [0.16.0](https://github.com/open-feature/playground/compare/v0.15.2...v0.16.0) (2024-05-22)
|
||||
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
* **deps:** update dependency flagsmith-nodejs to v3.3.0 ([d4a4468](https://github.com/open-feature/playground/commit/d4a446886a908451afd3c2d415e2c45a0895b95c))
|
||||
|
||||
|
||||
### ✨ New Features
|
||||
|
||||
* add Flipt to playground ([#293](https://github.com/open-feature/playground/issues/293)) ([ab99a8e](https://github.com/open-feature/playground/commit/ab99a8e5bc8e788c053bc675b8ff442696031d76))
|
||||
|
||||
## [0.15.2](https://github.com/open-feature/playground/compare/v0.15.1...v0.15.2) (2024-04-21)
|
||||
|
||||
|
||||
|
|
41
README.md
41
README.md
|
@ -28,8 +28,6 @@ If you're brand new to feature flagging, consider reviewing the [What are featur
|
|||
- [Harness](#harness)
|
||||
- [LaunchDarkly](#launchdarkly)
|
||||
- [Flagsmith](#flagsmith)
|
||||
- [Flipt](#flipt)
|
||||
- [ConfigCat](#configcat)
|
||||
- [Experimenting beyond the demo](#experimenting-beyond-the-demo)
|
||||
- [Evaluation context](#evaluation-context)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
|
@ -422,45 +420,6 @@ Now that everything is configured, you should be able to [start the demo](#how-t
|
|||
Now that everything is configured, you should be able to [start the demo](#how-to-run-the-demo). Once it's started, select `flagsmith` from the provider list located at the bottom right of your screen. You should now be able to control the demo app via Flagsmith!
|
||||
</details>
|
||||
|
||||
### Flipt
|
||||
|
||||
[Flipt](https://www.flipt.io/) is an open-source feature management platform that's fully self-hosted.
|
||||
It's easy to set up, has no seat limits, and is built for developers from scale-ups to enterprises.
|
||||
|
||||
After [starting the demo](#how-to-run-the-demo), the Flipt UI is available at [http://localhost:8080](http://localhost:8080).
|
||||
|
||||
### ConfigCat
|
||||
|
||||
[ConfigCat](https://configcat.com/) is a user-friendly, scalable and secure feature flagging solution with clear [pricing](https://configcat.com/#pricing). ConfigCat allows for unlimited team members and MAUs across all plans, including the free tier. All ConfigCat plans come with all security measures, including audit logs, two-factor authentication, SSO, SAML and SCIM for secure feature management. ConfigCat offers users the choice to keep data within the EU to comply with GDPR more easily. ConfigCat provides SDKs for all major programming languages and platforms.
|
||||
|
||||
<details>
|
||||
<summary>Follow these steps to set up ConfigCat for the demo:</summary>
|
||||
|
||||
1. Sign in to your ConfigCat account. If you don't already have an account, you can [sign up](https://app.configcat.com/auth/signup) for free.
|
||||
1. Create a new feature flag with the key `new-welcome-message`.
|
||||
|
||||
<img src="./images/configcat/new-welcome-message.png">
|
||||
|
||||
1. Create a new text setting with the key `hex-color`. Add three percentage options (`+ %` button) with the following values: `c05543`, `2f5230`, and `0d507b`. Set `c05543` to 100%. Set the `To unindentified` value to `c05543`.
|
||||
|
||||
<img src="./images/configcat/hex-color.png">
|
||||
|
||||
1. Create a new text setting with the key `fib-algo`.
|
||||
- Add a targeting rule (`+ IF` button) that looks for the `Email` user attribute to end with `@faas.com` and serves `binet`.
|
||||
- Add five percentage options (`+ %` button) with the following values: `recursive`, `memo`, `loop`, `binet`, and `default`. Set `recursive` to 100%.
|
||||
- Set the `To unindentified` value to `default`.
|
||||
|
||||
<img src="./images/configcat/fib-algo.png">
|
||||
|
||||
1. Click on `VIEW SDK KEY` and copy the `SDK Key`.
|
||||
|
||||
<img src="./images/configcat/sdk-key.png">
|
||||
|
||||
1. Open the `.env` file and set the values of `CONFIGCAT_SDK_KEY` and `CONFIGCAT_SDK_KEY_WEB` to the key copied above.
|
||||
|
||||
Now that everything is configured, you should be able to [start the demo](#how-to-run-the-demo). Once it's started, select `configcat` from the provider list located at the bottom right of your screen. You should now be able to control the demo app via ConfigCat!
|
||||
</details>
|
||||
|
||||
## Experimenting beyond the demo
|
||||
|
||||
### Evaluation context
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
version: "1.2"
|
||||
namespace: default
|
||||
flags:
|
||||
- key: new-welcome-message
|
||||
name: new-welcome-message
|
||||
type: BOOLEAN_FLAG_TYPE
|
||||
description: Controls the welcome banner message
|
||||
enabled: true
|
||||
rollouts:
|
||||
- threshold:
|
||||
percentage: 100
|
||||
value: true
|
||||
- key: hex-color
|
||||
name: hex-color
|
||||
type: VARIANT_FLAG_TYPE
|
||||
description: Controls the UI color
|
||||
enabled: true
|
||||
variants:
|
||||
- key: c05543
|
||||
name: red
|
||||
- key: 2f5230
|
||||
name: green
|
||||
- key: 0d507b
|
||||
name: blue
|
||||
- key: d4ac0d
|
||||
name: yellow
|
||||
rules:
|
||||
- segment: Signed-In-Users
|
||||
distributions:
|
||||
- variant: d4ac0d
|
||||
rollout: 100
|
||||
- segment: All-Users
|
||||
distributions:
|
||||
- variant: 2f5230
|
||||
rollout: 100
|
||||
- key: use-remote-fib-service
|
||||
name: use-remote-fib-service
|
||||
type: BOOLEAN_FLAG_TYPE
|
||||
description: Controls whether the remote fib service is used
|
||||
enabled: true
|
||||
rollouts:
|
||||
- segment:
|
||||
key: Signed-In-Users
|
||||
value: true
|
||||
- segment:
|
||||
key: All-Users
|
||||
- key: fib-algo
|
||||
name: fib-algo
|
||||
type: VARIANT_FLAG_TYPE
|
||||
description: The algorithm to calculate the fibbonaci sequence
|
||||
enabled: true
|
||||
variants:
|
||||
- key: binet
|
||||
name: binet
|
||||
- key: memo
|
||||
name: memo
|
||||
- key: loop
|
||||
name: loop
|
||||
- key: recursive
|
||||
name: recursive
|
||||
rules:
|
||||
- segment: All-Users
|
||||
distributions:
|
||||
- variant: memo
|
||||
rollout: 100
|
||||
segments:
|
||||
- key: All-Users
|
||||
name: All Users
|
||||
description: All users are matched
|
||||
match_type: ALL_MATCH_TYPE
|
||||
- key: Signed-In-Users
|
||||
name: Signed In Users
|
||||
description: Users that are signed in
|
||||
constraints:
|
||||
- type: STRING_COMPARISON_TYPE
|
||||
property: email
|
||||
operator: suffix
|
||||
value: '@faas.com'
|
||||
match_type: ALL_MATCH_TYPE
|
|
@ -1,131 +0,0 @@
|
|||
# Flags for our UI
|
||||
apiVersion: core.openfeature.dev/v1beta1
|
||||
kind: FeatureFlag
|
||||
metadata:
|
||||
name: ui-flags
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
spec:
|
||||
flagSpec:
|
||||
flags:
|
||||
new-welcome-message:
|
||||
state: ENABLED
|
||||
variants:
|
||||
'on': true
|
||||
'off': false
|
||||
defaultVariant: 'off'
|
||||
hex-color:
|
||||
variants:
|
||||
red: c05543
|
||||
green: 2f5230
|
||||
blue: 0d507b
|
||||
yellow: d4ac0d
|
||||
defaultVariant: blue
|
||||
state: ENABLED
|
||||
targeting:
|
||||
if:
|
||||
- in:
|
||||
- '@faas.com'
|
||||
- var:
|
||||
- email
|
||||
- yellow
|
||||
- null
|
||||
---
|
||||
# Feature flag source custom resource, configuring flagd to source flags from FeatureFlag CRDs
|
||||
apiVersion: core.openfeature.dev/v1beta1
|
||||
kind: FeatureFlagSource
|
||||
metadata:
|
||||
name: ui-flag-source
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
spec:
|
||||
sources:
|
||||
- source: ui-flags
|
||||
provider: kubernetes
|
||||
---
|
||||
# Standalone flagd for serving UI
|
||||
apiVersion: core.openfeature.dev/v1beta1
|
||||
kind: Flagd
|
||||
metadata:
|
||||
name: flagd-ui
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceAccountName: default
|
||||
featureFlagSource: ui-flag-source
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: 'false'
|
||||
hosts:
|
||||
- localhost
|
||||
- ''
|
||||
ingressClassName: nginx
|
||||
pathType: Prefix
|
||||
---
|
||||
# Deployment of a demo-app using our custom resources
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: open-feature-demo-deployment
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: open-feature-demo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
annotations:
|
||||
openfeature.dev/enabled: 'true'
|
||||
openfeature.dev/inprocessconfiguration: 'in-process-config'
|
||||
spec:
|
||||
containers:
|
||||
- name: open-feature-demo
|
||||
image: ghcr.io/open-feature/playground-app:v0.16.0 # x-release-please-version
|
||||
ports:
|
||||
- containerPort: 30000
|
||||
args:
|
||||
- flagd
|
||||
env:
|
||||
- name: FLAGD_PORT_WEB
|
||||
value: '80'
|
||||
- name: FLAGD_OFREP_PORT_WEB
|
||||
value: '80'
|
||||
---
|
||||
# Service to expose our application
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: open-feature-demo-app-service
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: open-feature-demo
|
||||
ports:
|
||||
- port: 30000
|
||||
targetPort: 30000
|
||||
nodePort: 30000
|
||||
---
|
||||
# Ingress for our application
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: open-feature-demo-ingress
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: localhost
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: /
|
||||
backend:
|
||||
service:
|
||||
name: open-feature-demo-app-service
|
||||
port:
|
||||
number: 30000
|
|
@ -25,9 +25,9 @@ spec:
|
|||
targeting:
|
||||
if:
|
||||
- in:
|
||||
- '@faas.com'
|
||||
- var:
|
||||
- email
|
||||
- "@faas.com"
|
||||
- var:
|
||||
- email
|
||||
- yellow
|
||||
- null
|
||||
---
|
||||
|
@ -52,9 +52,9 @@ spec:
|
|||
targeting:
|
||||
if:
|
||||
- in:
|
||||
- '@faas.com'
|
||||
- var:
|
||||
- email
|
||||
- "@faas.com"
|
||||
- var:
|
||||
- email
|
||||
- binet
|
||||
- null
|
||||
use-remote-fib-service:
|
||||
|
@ -96,19 +96,19 @@ spec:
|
|||
labels:
|
||||
app: open-feature-demo
|
||||
annotations:
|
||||
openfeature.dev/enabled: 'true'
|
||||
openfeature.dev/featureflagsource: 'flag-sources'
|
||||
openfeature.dev/enabled: "true"
|
||||
openfeature.dev/featureflagsource: "flag-sources"
|
||||
spec:
|
||||
containers:
|
||||
- name: open-feature-demo
|
||||
image: ghcr.io/open-feature/playground-app:v0.16.0 # x-release-please-version
|
||||
image: ghcr.io/open-feature/playground-app:v0.15.2 # x-release-please-version
|
||||
args:
|
||||
- flagd
|
||||
ports:
|
||||
- containerPort: 30000
|
||||
env:
|
||||
- name: FLAGD_PORT_WEB
|
||||
value: '30002'
|
||||
value: "30002"
|
||||
---
|
||||
# Service to expose our application
|
||||
apiVersion: v1
|
||||
|
|
|
@ -1,125 +0,0 @@
|
|||
# Flags for our backend application
|
||||
apiVersion: core.openfeature.dev/v1beta1
|
||||
kind: FeatureFlag
|
||||
metadata:
|
||||
name: app-flags
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
spec:
|
||||
flagSpec:
|
||||
flags:
|
||||
fib-algo:
|
||||
variants:
|
||||
recursive: recursive
|
||||
memo: memo
|
||||
loop: loop
|
||||
binet: binet
|
||||
defaultVariant: recursive
|
||||
state: ENABLED
|
||||
use-remote-fib-service:
|
||||
state: ENABLED
|
||||
variants:
|
||||
'on': true
|
||||
'off': false
|
||||
defaultVariant: 'off'
|
||||
---
|
||||
# Feature flag source custom resource, configuring flagd to source flags from FeatureFlag CRDs
|
||||
apiVersion: core.openfeature.dev/v1beta1
|
||||
kind: FeatureFlagSource
|
||||
metadata:
|
||||
name: app-flag-source
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
spec:
|
||||
sources:
|
||||
- source: app-flags
|
||||
provider: kubernetes
|
||||
---
|
||||
# Standalone flagd for serving in-process provider
|
||||
apiVersion: core.openfeature.dev/v1beta1
|
||||
kind: Flagd
|
||||
metadata:
|
||||
name: flagd-in-process
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceType: ClusterIP
|
||||
serviceAccountName: default
|
||||
featureFlagSource: app-flag-source
|
||||
---
|
||||
# In-process provider configuration
|
||||
apiVersion: core.openfeature.dev/v1beta1
|
||||
kind: InProcessConfiguration
|
||||
metadata:
|
||||
name: in-process-config
|
||||
spec:
|
||||
host: flagd-in-process
|
||||
---
|
||||
# Deployment of a demo-app using our custom resources
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: open-feature-demo-deployment
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: open-feature-demo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
annotations:
|
||||
openfeature.dev/enabled: 'true'
|
||||
openfeature.dev/inprocessconfiguration: 'in-process-config'
|
||||
spec:
|
||||
containers:
|
||||
- name: open-feature-demo
|
||||
image: ghcr.io/open-feature/playground-app:v0.16.0 # x-release-please-version
|
||||
ports:
|
||||
- containerPort: 30000
|
||||
args:
|
||||
- flagd
|
||||
env:
|
||||
- name: FLAGD_PORT_WEB
|
||||
value: '80'
|
||||
- name: FLAGD_PATH_PREFIX
|
||||
value: 'flagd'
|
||||
- name: FLAGD_OFREP_PORT_WEB
|
||||
value: '80'
|
||||
---
|
||||
# Service to expose our application
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: open-feature-demo-app-service
|
||||
labels:
|
||||
app: open-feature-demo
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: open-feature-demo
|
||||
ports:
|
||||
- port: 30000
|
||||
targetPort: 30000
|
||||
nodePort: 30000
|
||||
---
|
||||
# Ingress for our application
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: open-feature-demo-ingress
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: localhost
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: /
|
||||
backend:
|
||||
service:
|
||||
name: open-feature-demo-app-service
|
||||
port:
|
||||
number: 30000
|
|
@ -1,7 +1,7 @@
|
|||
version: '3.8'
|
||||
services:
|
||||
demo:
|
||||
image: ghcr.io/open-feature/playground-app:v0.16.0 # x-release-please-version
|
||||
image: ghcr.io/open-feature/playground-app:v0.15.2 # x-release-please-version
|
||||
# build:
|
||||
# dockerfile: ./packages/app/Dockerfile
|
||||
# context: .
|
||||
|
@ -23,8 +23,6 @@ services:
|
|||
- GO_FEATURE_FLAG_URL=http://go-feature-flag:1031
|
||||
- GO_FEATURE_FLAG_WEB_URL=http://localhost:1031
|
||||
- FIB_SERVICE_URL=http://fib-service:30001
|
||||
- FLIPT_URL=http://flipt:8080
|
||||
- FLIPT_WEB_URL=http://localhost:8080
|
||||
- FIB_SERVICE_USER
|
||||
- FIB_SERVICE_PASS
|
||||
# Provider values come from the .env
|
||||
|
@ -38,7 +36,6 @@ services:
|
|||
- LD_KEY
|
||||
- FLAGSMITH_ENV_KEY
|
||||
- CLOUDBEES_APP_KEY
|
||||
- CONFIGCAT_SDK_KEY
|
||||
## Web
|
||||
- HARNESS_KEY_WEB
|
||||
- SPLIT_KEY_WEB
|
||||
|
@ -47,11 +44,10 @@ services:
|
|||
- CLOUDBEES_APP_KEY_WEB
|
||||
- FLAGD_HOST_WEB
|
||||
- FLAGD_PORT_WEB
|
||||
- FLAGD_TLS_WEB
|
||||
- CONFIGCAT_SDK_KEY_WEB
|
||||
- FLAGD_TLS_WEB
|
||||
|
||||
fib-service:
|
||||
image: ghcr.io/open-feature/playground-fib-service:v0.16.0 # x-release-please-version
|
||||
image: ghcr.io/open-feature/playground-fib-service:v0.15.2 # x-release-please-version
|
||||
# build:
|
||||
# dockerfile: ./packages/fibonacci-service/Dockerfile
|
||||
# context: .
|
||||
|
@ -63,7 +59,6 @@ services:
|
|||
- OTEL_EXPORTER_JAEGER_AGENT_PORT=6832
|
||||
- OTEL_SERVICE_NAME=fibonacci-service
|
||||
- GO_FEATURE_FLAG_URL=http://go-feature-flag:1031
|
||||
- FLIPT_URL=http://flipt:8080
|
||||
- FIB_SERVICE_USER
|
||||
- FIB_SERVICE_PASS
|
||||
# Provider values come from the .env
|
||||
|
@ -76,10 +71,9 @@ services:
|
|||
- LD_KEY
|
||||
- FLAGSMITH_ENV_KEY
|
||||
- CLOUDBEES_APP_KEY
|
||||
- CONFIGCAT_SDK_KEY
|
||||
|
||||
jaeger:
|
||||
image: jaegertracing/all-in-one:1.60
|
||||
image: jaegertracing/all-in-one:1.56
|
||||
expose:
|
||||
- '6832/udp'
|
||||
- '4317'
|
||||
|
@ -87,7 +81,7 @@ services:
|
|||
- '16686:16686'
|
||||
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:0.105.0
|
||||
image: otel/opentelemetry-collector-contrib:0.98.0
|
||||
restart: always
|
||||
command: [ "--config=/etc/otel-collector-config.yaml" ]
|
||||
volumes:
|
||||
|
@ -103,7 +97,7 @@ services:
|
|||
|
||||
prometheus:
|
||||
container_name: prometheus
|
||||
image: prom/prometheus:v2.55.1
|
||||
image: prom/prometheus:v2.51.2
|
||||
restart: always
|
||||
volumes:
|
||||
- ./config/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml
|
||||
|
@ -111,7 +105,7 @@ services:
|
|||
- "9090:9090"
|
||||
|
||||
flagd:
|
||||
image: ghcr.io/open-feature/flagd:v0.11.5
|
||||
image: ghcr.io/open-feature/flagd:v0.10.1
|
||||
command:
|
||||
- start
|
||||
- --cors-origin
|
||||
|
@ -129,40 +123,11 @@ services:
|
|||
- '8016:8016'
|
||||
|
||||
go-feature-flag:
|
||||
image: thomaspoignant/go-feature-flag:v1.40.0
|
||||
image: thomaspoignant/go-feature-flag:v1.26.0
|
||||
volumes:
|
||||
- ./config/go-feature-flag:/goff/
|
||||
ports:
|
||||
- "1031:1031"
|
||||
|
||||
init_flipt:
|
||||
image: docker.flipt.io/flipt/flipt:v1.53.2
|
||||
command: ["./flipt", "import", "/var/opt/flipt/flipt.yml"]
|
||||
environment:
|
||||
FLIPT_LOG_LEVEL: debug
|
||||
FLIPT_META_TELEMETRY_ENABLED: false
|
||||
FLIPT_DB_URL: "/var/opt/flipt/flipt.db"
|
||||
volumes:
|
||||
- "./config/flipt/flipt.yml:/var/opt/flipt/flipt.yml"
|
||||
- "flipt:/var/opt/flipt"
|
||||
|
||||
flipt:
|
||||
image: docker.flipt.io/flipt/flipt:v1.53.2
|
||||
command: ["./flipt", "--force-migrate"]
|
||||
environment:
|
||||
FLIPT_CORS_ENABLED: true
|
||||
FLIPT_TRACING_ENABLED: true
|
||||
FLIPT_TRACING_EXPORTER: otlp
|
||||
FLIPT_TRACING_OTLP_ENDPOINT: "otel-collector:4317"
|
||||
FLIPT_DB_URL: "/var/opt/flipt/flipt.db"
|
||||
volumes:
|
||||
- "./config/flipt/flipt.yml:/var/opt/flipt/flipt.yml"
|
||||
- "flipt:/var/opt/flipt"
|
||||
depends_on:
|
||||
- init_flipt
|
||||
ports:
|
||||
- '8080:8080'
|
||||
|
||||
volumes:
|
||||
flagd-flags:
|
||||
flipt:
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 64 KiB |
Binary file not shown.
Before Width: | Height: | Size: 39 KiB |
Binary file not shown.
Before Width: | Height: | Size: 33 KiB |
Binary file not shown.
Before Width: | Height: | Size: 49 KiB |
File diff suppressed because it is too large
Load Diff
62
package.json
62
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "openfeature",
|
||||
"version": "0.16.0",
|
||||
"version": "0.15.2",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
"ui": "nx run ui:serve",
|
||||
|
@ -19,17 +19,13 @@
|
|||
"@harnessio/ff-javascript-client-sdk": "^1.21.0",
|
||||
"@harnessio/ff-nodejs-server-sdk": "^1.4.0",
|
||||
"@nestjs/axios": "^3.0.2",
|
||||
"@nestjs/common": "10.4.15",
|
||||
"@nestjs/core": "10.4.15",
|
||||
"@nestjs/platform-express": "10.4.15",
|
||||
"@nestjs/common": "10.3.8",
|
||||
"@nestjs/core": "10.3.8",
|
||||
"@nestjs/platform-express": "10.3.8",
|
||||
"@nestjs/serve-static": "^4.0.2",
|
||||
"@openfeature/config-cat-web-provider": "^0.1.3",
|
||||
"@openfeature/config-cat-provider": "^0.7.2",
|
||||
"@openfeature/env-var-provider": "^0.3.0",
|
||||
"@openfeature/flagd-provider": "^0.13.0",
|
||||
"@openfeature/flagd-web-provider": "^0.7.0",
|
||||
"@openfeature/flipt-provider": "^0.1.0",
|
||||
"@openfeature/flipt-web-provider": "^0.1.0",
|
||||
"@openfeature/go-feature-flag-provider": "^0.7.0",
|
||||
"@openfeature/go-feature-flag-web-provider": "^0.2.0",
|
||||
"@openfeature/nestjs-sdk": "^0.1.3-experimental",
|
||||
|
@ -48,7 +44,7 @@
|
|||
"@opentelemetry/semantic-conventions": "^1.23.0",
|
||||
"@splitsoftware/openfeature-js-split-provider": "^1.0.7",
|
||||
"@splitsoftware/splitio": "^10.24.1",
|
||||
"@splitsoftware/splitio-browserjs": "^0.14.0",
|
||||
"@splitsoftware/splitio-browserjs": "^0.10.1",
|
||||
"@types/rox-browser": "^5.0.7",
|
||||
"change-case": "^4.1.2",
|
||||
"class-validator": "^0.14.1",
|
||||
|
@ -56,7 +52,7 @@
|
|||
"clsx": "^1.2.1",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"events": "^3.3.0",
|
||||
"express": "4.21.2",
|
||||
"express": "4.19.2",
|
||||
"express-validator": "^7.0.1",
|
||||
"flagsmith": "^3.21.0",
|
||||
"flagsmith-nodejs": "^3.2.0",
|
||||
|
@ -66,18 +62,18 @@
|
|||
"pino-http": "^9.0.0",
|
||||
"pino-pretty": "^11.0.0",
|
||||
"react-router-dom": "^6.21.1",
|
||||
"reflect-metadata": "^0.2.0",
|
||||
"reflect-metadata": "^0.1.14",
|
||||
"rox-browser": "^5.4.9",
|
||||
"rox-node": "^5.4.9",
|
||||
"rxjs": "^7.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-react": "^7.23.3",
|
||||
"@emotion/react": "11.14.0",
|
||||
"@emotion/styled": "11.14.0",
|
||||
"@emotion/react": "11.11.4",
|
||||
"@emotion/styled": "11.11.5",
|
||||
"@mui/material": "^5.15.2",
|
||||
"@nestjs/schematics": "10.2.3",
|
||||
"@nestjs/testing": "10.4.15",
|
||||
"@nestjs/schematics": "10.1.1",
|
||||
"@nestjs/testing": "10.3.8",
|
||||
"@nrwl/tao": "17.3.2",
|
||||
"@nx/devkit": "17.3.2",
|
||||
"@nx/eslint-plugin": "17.3.2",
|
||||
|
@ -98,9 +94,9 @@
|
|||
"@types/events": "^3.0.3",
|
||||
"@types/express": "4.17.21",
|
||||
"@types/jest": "^29.5.11",
|
||||
"@types/node": "18.19.68",
|
||||
"@types/react": "18.3.18",
|
||||
"@types/react-dom": "18.3.5",
|
||||
"@types/node": "18.19.31",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/react-dom": "18.2.25",
|
||||
"@types/react-json-editor-ajrm": "^2.5.6",
|
||||
"@types/react-modal": "^3.16.3",
|
||||
"@types/rox-node": "^5.0.5",
|
||||
|
@ -110,12 +106,12 @@
|
|||
"babel-jest": "^29.7.0",
|
||||
"core-js": "^3.35.0",
|
||||
"css-loader": "^6.8.1",
|
||||
"eslint": "8.57.1",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-import": "2.31.0",
|
||||
"eslint-plugin-jsx-a11y": "6.10.2",
|
||||
"eslint-plugin-react": "7.37.2",
|
||||
"eslint-plugin-react-hooks": "4.6.2",
|
||||
"eslint-plugin-import": "2.29.1",
|
||||
"eslint-plugin-jsx-a11y": "6.8.0",
|
||||
"eslint-plugin-react": "7.34.1",
|
||||
"eslint-plugin-react-hooks": "4.6.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"json-schema-to-typescript": "^11.0.5",
|
||||
|
@ -127,26 +123,18 @@
|
|||
"react-json-editor-ajrm": "^2.5.14",
|
||||
"react-json-view": "^1.21.3",
|
||||
"react-modal": "^3.16.1",
|
||||
"react-refresh": "^0.16.0",
|
||||
"regenerator-runtime": "^0.14.0",
|
||||
"react-refresh": "^0.14.0",
|
||||
"regenerator-runtime": "^0.13.11",
|
||||
"style-loader": "^3.3.3",
|
||||
"styled-components": "5.3.11",
|
||||
"stylus": "^0.64.0",
|
||||
"stylus": "^0.59.0",
|
||||
"stylus-loader": "^7.1.3",
|
||||
"ts-jest": "29.2.5",
|
||||
"ts-jest": "29.1.2",
|
||||
"ts-node": "10.9.2",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "5.7.2",
|
||||
"typescript": "5.4.5",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "5.97.1",
|
||||
"webpack": "5.91.0",
|
||||
"webpack-merge": "^5.10.0"
|
||||
},
|
||||
"overrides": {
|
||||
"braces": ">=3.0.3",
|
||||
"ws": ">=8.17.1",
|
||||
"@grpc/grpc-js": ">=1.10.9",
|
||||
"@openfeature/config-cat-provider": {
|
||||
"@openfeature/server-sdk": "1.13.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:20.18-bullseye AS builder
|
||||
FROM node:20.12-bullseye AS builder
|
||||
WORKDIR /tmp/playground/
|
||||
COPY package*.json tsconfig*.json nx.json babel.config.json ./
|
||||
COPY schemas/ ./schemas/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:20.18-bullseye-slim AS builder
|
||||
FROM node:20.12-bullseye-slim AS builder
|
||||
WORKDIR /tmp/playground/
|
||||
COPY package*.json tsconfig*.json nx.json babel.config.json ./
|
||||
RUN npm ci
|
||||
|
|
|
@ -15,12 +15,10 @@ import { OpenFeatureLogger } from '@openfeature/extra';
|
|||
import {
|
||||
AvailableProvider,
|
||||
CB_PROVIDER_ID,
|
||||
CONFIGCAT_PROVIDER_ID,
|
||||
ENV_PROVIDER_ID,
|
||||
FLAGD_OFREP_PROVIDER_ID,
|
||||
FLAGD_PROVIDER_ID,
|
||||
FLAGSMITH_PROVIDER_ID,
|
||||
FLIPT_PROVIDER_ID,
|
||||
GO_OFREP_PROVIDER_ID,
|
||||
GO_PROVIDER_ID,
|
||||
HARNESS_PROVIDER_ID,
|
||||
|
@ -28,9 +26,6 @@ import {
|
|||
SPLIT_PROVIDER_ID,
|
||||
} from '@openfeature/utils';
|
||||
import { OFREPProvider } from '@openfeature/ofrep-provider';
|
||||
import { FliptProvider } from '@openfeature/flipt-provider';
|
||||
import { ConfigCatProvider } from '@openfeature/config-cat-provider';
|
||||
import { PollingMode } from 'configcat-node';
|
||||
|
||||
type ProviderMap = Record<
|
||||
ProviderId,
|
||||
|
@ -119,14 +114,14 @@ export class ProviderService {
|
|||
endpoint: process.env.GO_FEATURE_FLAG_URL as string,
|
||||
}),
|
||||
available: () => !!process.env.GO_FEATURE_FLAG_URL,
|
||||
url: process.env.GO_FEATURE_FLAG_WEB_URL as string,
|
||||
url: process.env.GO_FEATURE_FLAG_WEB_URL as string
|
||||
},
|
||||
[GO_OFREP_PROVIDER_ID]: {
|
||||
factory: () => {
|
||||
return new OFREPProvider({ baseUrl: process.env.GO_FEATURE_FLAG_URL as string });
|
||||
},
|
||||
available: () => !!process.env.GO_FEATURE_FLAG_URL,
|
||||
url: process.env.GO_FEATURE_FLAG_WEB_URL as string,
|
||||
url: process.env.GO_FEATURE_FLAG_WEB_URL as string
|
||||
},
|
||||
[FLAGSMITH_PROVIDER_ID]: {
|
||||
factory: () => {
|
||||
|
@ -167,25 +162,6 @@ export class ProviderService {
|
|||
available: () => !!process.env.HARNESS_KEY && !!process.env.HARNESS_KEY_WEB,
|
||||
webCredential: process.env.HARNESS_KEY_WEB,
|
||||
},
|
||||
[FLIPT_PROVIDER_ID]: {
|
||||
factory: () => {
|
||||
return new FliptProvider('default', { url: process.env.FLIPT_URL as string });
|
||||
},
|
||||
available: () => !!process.env.FLIPT_URL,
|
||||
url: process.env.FLIPT_WEB_URL,
|
||||
},
|
||||
[CONFIGCAT_PROVIDER_ID]: {
|
||||
factory: () => {
|
||||
const sdkKey = process.env.CONFIGCAT_SDK_KEY;
|
||||
if (!sdkKey) {
|
||||
throw new Error('"CONFIGCAT_SDK_KEY" must be defined.');
|
||||
} else {
|
||||
return ConfigCatProvider.create(sdkKey, PollingMode.AutoPoll, { pollIntervalSeconds: 5 });
|
||||
}
|
||||
},
|
||||
available: () => !!process.env.CONFIGCAT_SDK_KEY && !!process.env.CONFIGCAT_SDK_KEY_WEB,
|
||||
webCredential: process.env.CONFIGCAT_SDK_KEY_WEB,
|
||||
},
|
||||
};
|
||||
|
||||
constructor() {
|
||||
|
@ -230,7 +206,7 @@ export class ProviderService {
|
|||
host: p[1].host,
|
||||
port: p[1].port,
|
||||
tls: p[1].tls,
|
||||
url: p[1].url,
|
||||
url: p[1].url
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,11 +3,9 @@ import { FlagdWebProvider } from '@openfeature/flagd-web-provider';
|
|||
import {
|
||||
AvailableProvider,
|
||||
CB_PROVIDER_ID,
|
||||
CONFIGCAT_PROVIDER_ID,
|
||||
FLAGD_OFREP_PROVIDER_ID,
|
||||
FLAGD_PROVIDER_ID,
|
||||
FLAGSMITH_PROVIDER_ID,
|
||||
FLIPT_PROVIDER_ID,
|
||||
GO_OFREP_PROVIDER_ID,
|
||||
GO_PROVIDER_ID,
|
||||
HARNESS_PROVIDER_ID,
|
||||
|
@ -35,8 +33,6 @@ import { styledFib3rSteps } from './demos/fib3r/tour';
|
|||
import { JSON_UPDATED } from './types';
|
||||
import { getData } from './utils';
|
||||
import { GoFeatureFlagWebProvider } from '@openfeature/go-feature-flag-web-provider';
|
||||
import { FliptWebProvider } from '@openfeature/flipt-web-provider';
|
||||
import { ConfigCatWebProvider } from '@openfeature/config-cat-web-provider';
|
||||
|
||||
type ProviderMap = Record<
|
||||
string,
|
||||
|
@ -134,17 +130,6 @@ export class Demos extends Component<
|
|||
return new SplitWebProvider(this.getProviderCredential(SPLIT_PROVIDER_ID));
|
||||
},
|
||||
},
|
||||
[FLIPT_PROVIDER_ID]: {
|
||||
factory: () => {
|
||||
const fliptConfig = this.state.availableProviders.find((p) => p.id === FLIPT_PROVIDER_ID);
|
||||
return new FliptWebProvider('default', { url: fliptConfig?.url });
|
||||
},
|
||||
},
|
||||
[CONFIGCAT_PROVIDER_ID]: {
|
||||
factory: () => {
|
||||
return ConfigCatWebProvider.create(this.getProviderCredential(CONFIGCAT_PROVIDER_ID), { pollIntervalSeconds: 5 });
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
constructor(props: Record<string, never>) {
|
||||
|
|
|
@ -8,8 +8,6 @@ export const SPLIT_PROVIDER_ID = 'split';
|
|||
export const CB_PROVIDER_ID = 'cloudbees';
|
||||
export const FLAGSMITH_PROVIDER_ID = 'flagsmith';
|
||||
export const HARNESS_PROVIDER_ID = 'harness';
|
||||
export const FLIPT_PROVIDER_ID = 'flipt';
|
||||
export const CONFIGCAT_PROVIDER_ID = 'configcat';
|
||||
|
||||
export type ProviderId =
|
||||
| typeof ENV_PROVIDER_ID
|
||||
|
@ -21,9 +19,7 @@ export type ProviderId =
|
|||
| typeof SPLIT_PROVIDER_ID
|
||||
| typeof CB_PROVIDER_ID
|
||||
| typeof FLAGSMITH_PROVIDER_ID
|
||||
| typeof HARNESS_PROVIDER_ID
|
||||
| typeof FLIPT_PROVIDER_ID
|
||||
| typeof CONFIGCAT_PROVIDER_ID;
|
||||
| typeof HARNESS_PROVIDER_ID;
|
||||
|
||||
export interface AvailableProvider {
|
||||
id: ProviderId;
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"description": "Default preset for use with OpenFeature's repos",
|
||||
"extends": [ "github>open-feature/community-tooling" ],
|
||||
"extends": ["config:recommended"],
|
||||
"semanticCommits": "enabled",
|
||||
"automergeType": "branch",
|
||||
"configMigration": true,
|
||||
"dependencyDashboard": true,
|
||||
"prCreation": "not-pending",
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"platformAutomerge": true,
|
||||
"platformCommit": true,
|
||||
"npm": {
|
||||
"packageRules": [
|
||||
{
|
||||
|
@ -13,10 +20,6 @@
|
|||
"matchPackagePatterns": ["@opentelemtry/"],
|
||||
"groupName": "OpenTelemetry"
|
||||
},
|
||||
{
|
||||
"matchPackagePatterns": ["@openfeature/"],
|
||||
"groupName": "OpenFeature"
|
||||
},
|
||||
{
|
||||
"matchPackagePatterns": ["@typescript-eslint", "eslint"],
|
||||
"groupName": "ESLint"
|
||||
|
@ -36,4 +39,16 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Automerge non-major updates",
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"matchCurrentVersion": "!/^0/",
|
||||
"automerge": true
|
||||
},
|
||||
{
|
||||
"matchManagers": ["github-actions"],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue