From 811777e316607c7b497f0592ce35ea9452e013d0 Mon Sep 17 00:00:00 2001 From: s2002a <38680131+dsun0720@users.noreply.github.com> Date: Fri, 1 Dec 2023 08:50:42 +0100 Subject: [PATCH] feat: compatible with 3.0.1 (#29) --- charts/featbit/Chart.yaml | 4 ++-- .../mongodb-init-scripts-configmap.yaml | 24 +++++++++++++++++-- charts/featbit/values.yaml | 8 +++---- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/charts/featbit/Chart.yaml b/charts/featbit/Chart.yaml index 6fbb088..2141413 100644 --- a/charts/featbit/Chart.yaml +++ b/charts/featbit/Chart.yaml @@ -15,13 +15,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.9 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "2.5.3" +appVersion: "3.0.1" kubeVersion: ">=1.23-0" diff --git a/charts/featbit/templates/mongodb-init-scripts-configmap.yaml b/charts/featbit/templates/mongodb-init-scripts-configmap.yaml index a4411b7..62064ad 100644 --- a/charts/featbit/templates/mongodb-init-scripts-configmap.yaml +++ b/charts/featbit/templates/mongodb-init-scripts-configmap.yaml @@ -17,6 +17,7 @@ data: print('seed started...') // seed ids + const workspaceId = UUID() const userId = UUID() const organizationId = UUID() @@ -30,6 +31,22 @@ data: return UUID().toString().split('"')[1]; } + // seed workspace + print('clean and seed collection: Workspaces') + db.Workspaces.deleteMany({}) + db.Workspaces.insertOne( + { + _id: workspaceId, + name: "Default Workspace", + key: "default-workspace", + sso: null, + license: null, + createdAt: new Date(), + updatedAt: new Date() + } + ) + print('collection seeded: Workspaces') + // seed user print('clean and seed collection: Users') db.Users.deleteMany({}) @@ -39,6 +56,8 @@ data: email: "test@featbit.com", password: "AQAAAAEAACcQAAAAELDHEjCrDQrmnAXU5C//mOLvUBJ7lnVFEMMFxNMDIIrF7xK8JDQKUifU3HH4gexNAQ==", name: "tester", + origin: "Local", + workspaceId: workspaceId, createAt: new Date(), updatedAt: new Date() } @@ -51,6 +70,7 @@ data: db.Organizations.insertOne( { _id: organizationId, + workspaceId: workspaceId, name: "playground", initialized: false, createdAt: new Date(), @@ -108,10 +128,10 @@ data: statements: [ { _id: getUUIDString(), - resourceType: "account", + resourceType: "organization", effect: "allow", actions: ["UpdateOrgName"], - resources: ["account/*"] + resources: ["organization/*"] }, { _id: getUUIDString(), diff --git a/charts/featbit/values.yaml b/charts/featbit/values.yaml index 43ea8fd..1d76e74 100644 --- a/charts/featbit/values.yaml +++ b/charts/featbit/values.yaml @@ -38,7 +38,7 @@ ui: repository: featbit/featbit-ui pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: 2.5.3 + tag: 3.0.1 imagePullSecrets: [ ] @@ -116,7 +116,7 @@ api: repository: featbit/featbit-api-server pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: 2.5.3 + tag: 3.0.1 imagePullSecrets: [ ] @@ -194,7 +194,7 @@ els: repository: featbit/featbit-evaluation-server pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: 2.5.3 + tag: 3.0.1 imagePullSecrets: [ ] @@ -273,7 +273,7 @@ das: repository: featbit/featbit-data-analytics-server pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: 2.5.3 + tag: 3.0.1 imagePullSecrets: [ ]