diff --git a/README.md b/README.md index bcd989fb..06e59e3a 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,12 @@ | Readme | Chart Version | App Version | Description | Hub | |--------|---------------|-------------|-------------|-----| | [Agent](./charts/agent/README.md) | 2.13.1 | v2.9.0 | Formance Membership Agent Helm Chart | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/agent)](https://artifacthub.io/packages/search?repo=agent) | -| [Cloudprem](./charts/cloudprem/README.md) | 4.6.2 | latest | Formance control-plane | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/cloudprem)](https://artifacthub.io/packages/search?repo=cloudprem) | -| [Console-V3](./charts/console-v3/README.md) | 3.5.1 | v2.5.1 | Formance Console | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/console-v3)](https://artifacthub.io/packages/search?repo=console-v3) | +| [Cloudprem](./charts/cloudprem/README.md) | 5.0.0 | latest | Formance control-plane | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/cloudprem)](https://artifacthub.io/packages/search?repo=cloudprem) | +| [Console-V3](./charts/console-v3/README.md) | 4.0.0 | v3.0.0 | Formance Console | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/console-v3)](https://artifacthub.io/packages/search?repo=console-v3) | | [Core](./charts/core/README.md) | 1.5.1 | latest | Formance Core Library | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/core)](https://artifacthub.io/packages/search?repo=core) | -| [Formance](./charts/formance/README.md) | 1.10.1 | latest | Formance Platform - Unified Helm Chart | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/formance)](https://artifacthub.io/packages/search?repo=formance) | +| [Formance](./charts/formance/README.md) | 2.0.0 | latest | Formance Platform - Unified Helm Chart | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/formance)](https://artifacthub.io/packages/search?repo=formance) | | [Membership](./charts/membership/README.md) | 3.3.0 | v2.3.1 | Formance EE Membership API. Manage stacks, organizations, regions, invitations, users, roles, and permissions. | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/membership)](https://artifacthub.io/packages/search?repo=membership) | -| [Portal](./charts/portal/README.md) | 3.5.1 | v2.5.1 | Formance Portal | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/portal)](https://artifacthub.io/packages/search?repo=portal) | +| [Portal](./charts/portal/README.md) | 4.0.0 | v3.0.0 | Formance Portal | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/portal)](https://artifacthub.io/packages/search?repo=portal) | | [Regions](./charts/regions/README.md) | 3.9.8 | latest | Formance Private Regions Helm Chart | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/regions)](https://artifacthub.io/packages/search?repo=regions) | | [Stargate](./charts/stargate/README.md) | 0.10.1 | latest | Formance EE Stargate gRPC Gateway | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/stargate)](https://artifacthub.io/packages/search?repo=stargate) | diff --git a/charts/cloudprem/Chart.lock b/charts/cloudprem/Chart.lock index 9f5c8800..311e57c7 100644 --- a/charts/cloudprem/Chart.lock +++ b/charts/cloudprem/Chart.lock @@ -4,9 +4,9 @@ dependencies: version: 3.3.0 - name: portal repository: file://../portal - version: 3.5.1 + version: 4.0.0 - name: console-v3 repository: file://../console-v3 - version: 3.5.1 -digest: sha256:f8005d42e8ef6e899f763f3665e9e824bc98d8b81fcb0d9b66cbecc900db645a -generated: "2026-05-25T12:07:45.651364+02:00" + version: 4.0.0 +digest: sha256:20102ddada0619f0ba26b997ec566e8a2b2f3f8cf80e2de1cfa998619ba315af +generated: "2026-05-25T15:55:14.910047+02:00" diff --git a/charts/cloudprem/Chart.yaml b/charts/cloudprem/Chart.yaml index 718b6403..8928e1cf 100644 --- a/charts/cloudprem/Chart.yaml +++ b/charts/cloudprem/Chart.yaml @@ -31,7 +31,7 @@ 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: 4.6.2 +version: 5.0.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 @@ -53,10 +53,10 @@ dependencies: repository: file://../membership condition: global.platform.membership.enabled - name: portal - version: 3.X + version: 4.X repository: file://../portal condition: global.platform.portal.enabled - name: console-v3 - version: 3.X + version: 4.X repository: file://../console-v3 condition: global.platform.consoleV3.enabled diff --git a/charts/cloudprem/README.md b/charts/cloudprem/README.md index 361cb027..6737a9ef 100644 --- a/charts/cloudprem/README.md +++ b/charts/cloudprem/README.md @@ -1,7 +1,7 @@ # Formance cloudprem Helm chart [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/cloudprem)](https://artifacthub.io/packages/search?repo=cloudprem) -![Version: 4.6.2](https://img.shields.io/badge/Version-4.6.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 5.0.0](https://img.shields.io/badge/Version-5.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) Formance control-plane @@ -13,9 +13,9 @@ Kubernetes: `>=1.14.0-0` | Repository | Name | Version | |------------|------|---------| -| file://../console-v3 | console-v3 | 3.X | +| file://../console-v3 | console-v3 | 4.X | | file://../membership | membership | 3.X | -| file://../portal | portal | 3.X | +| file://../portal | portal | 4.X | > [!IMPORTANT] > You need to obtain a licence from the Formance team. (See [EE Licence](#ee-licence)) @@ -272,6 +272,36 @@ See [profiles](./profiles) for more examples. ## Migration +### From v4.X.X To v5.0.0 + +#### Breaking changes + +The bundled `portal` and `console-v3` subcharts have been bumped to `v4.X` (app `v3.0.0`) +and now default their container `command` / `args` to the slim production image entrypoint +(`react-router-serve ./build/server/index.js`) and the migration runner to +`node dist/migrate.cjs`. Consumers still running the legacy `pnpm`-based images **must** +override these values to keep the previous behavior: + +```yaml +portal: + command: ["pnpm"] + args: ["start"] + config: + migration: + command: ["pnpm"] + args: ["migrate", "up"] + +console-v3: + command: ["pnpm"] + args: ["start"] + config: + migration: + command: ["pnpm"] + args: ["migrate", "up"] +``` + +If you already pin a recent image tag shipping the slim entrypoint, no action is required. + ### From v3.X.X To v4.0.0 #### Breaking changes @@ -479,7 +509,11 @@ Dex: | Key | Type | Default | Description | |-----|------|---------|-------------| +| console-v3.config.migration.args | list | `["dist/migrate.cjs"]` | Migrate-job args. The bundled runner reads SQL files from `./dist/migrations` (set via `MIGRATIONS_FOLDER` env in the image). | +| console-v3.config.migration.command | list | `["node"]` | Migrate-job command. Defaults to the bundled CJS migration runner shipped at `dist/migrate.cjs` by platform-ui#1195. | | console-v3.config.migration.enabled | bool | `true` | Enable migration job with a separated user | +| portal.config.migration.args | list | `["dist/migrate.cjs"]` | Migrate-job args. The bundled runner reads SQL files from `./dist/migrations` (set via `MIGRATIONS_FOLDER` env in the image). | +| portal.config.migration.command | list | `["node"]` | Migrate-job command. Defaults to the bundled CJS migration runner shipped at `dist/migrate.cjs` by platform-ui#1195. | | portal.config.migration.enabled | bool | `true` | Enable migration job with a separated user | ### Console configuration @@ -576,6 +610,7 @@ Dex: | global.platform.stargate.tls.disable | bool | `false` | | | console-v3.affinity | object | `{}` | Console affinity | | console-v3.annotations | object | `{}` | Console annotations | +| console-v3.args | list | `["./build/server/index.js"]` | Entrypoint args for the console-v3 container. | | console-v3.autoscaling.enabled | bool | `false` | | | console-v3.autoscaling.maxReplicas | int | `100` | | | console-v3.autoscaling.minReplicas | int | `1` | | @@ -585,6 +620,7 @@ Dex: | console-v3.aws.targetGroups.http.serviceRef.port | string | `"{{ .Values.service.ports.http.port }}"` | Target group service reference port | | console-v3.aws.targetGroups.http.targetGroupARN | string | `""` | Target group ARN | | console-v3.aws.targetGroups.http.targetType | string | `"ip"` | Target group target type | +| console-v3.command | list | `["node_modules/.bin/react-router-serve"]` | Entrypoint command for the console-v3 container. Defaults match the slim `prod-remix` image which has no `pnpm` (saved ~30 MB) and invokes the React Router server binary directly. | | console-v3.config.additionalEnv | list | `[{"name":"FEATURES_DISABLED","value":"sessions"}]` | Console additional environment variables | | console-v3.config.cookie.encryptionKey | string | `"changeMe00"` | is used to encrypt a cookie value | | console-v3.config.cookie.existingSecret | string | `""` | is the name of the secret | @@ -726,10 +762,12 @@ Dex: | membership.volumes | list | `[]` | Membership volumes | | portal.affinity | object | `{}` | Portal affinity | | portal.annotations | object | `{}` | Portal annotations | +| portal.args | list | `["./build/server/index.js"]` | Entrypoint args for the portal container. | | portal.autoscaling.enabled | bool | `false` | | | portal.autoscaling.maxReplicas | int | `100` | | | portal.autoscaling.minReplicas | int | `1` | | | portal.autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| portal.command | list | `["node_modules/.bin/react-router-serve"]` | Entrypoint command for the portal container. Defaults match the slim `prod-remix` image which has no `pnpm` (saved ~30 MB) and invokes the React Router server binary directly. | | portal.config.additionalEnv | list | `[]` | Additional environment variables | | portal.config.cookie.existingSecret | string | `""` | Cookie existing secret | | portal.config.cookie.secret | string | `"changeMe2"` | Cookie secret | diff --git a/charts/cloudprem/README.md.gotmpl b/charts/cloudprem/README.md.gotmpl index c569399d..2814c52d 100644 --- a/charts/cloudprem/README.md.gotmpl +++ b/charts/cloudprem/README.md.gotmpl @@ -268,6 +268,36 @@ See [profiles](./profiles) for more examples. ## Migration +### From v4.X.X To v5.0.0 + +#### Breaking changes + +The bundled `portal` and `console-v3` subcharts have been bumped to `v4.X` (app `v3.0.0`) +and now default their container `command` / `args` to the slim production image entrypoint +(`react-router-serve ./build/server/index.js`) and the migration runner to +`node dist/migrate.cjs`. Consumers still running the legacy `pnpm`-based images **must** +override these values to keep the previous behavior: + +```yaml +portal: + command: ["pnpm"] + args: ["start"] + config: + migration: + command: ["pnpm"] + args: ["migrate", "up"] + +console-v3: + command: ["pnpm"] + args: ["start"] + config: + migration: + command: ["pnpm"] + args: ["migrate", "up"] +``` + +If you already pin a recent image tag shipping the slim entrypoint, no action is required. + ### From v3.X.X To v4.0.0 #### Breaking changes diff --git a/charts/console-v3/Chart.yaml b/charts/console-v3/Chart.yaml index 9755a8ea..336738ed 100644 --- a/charts/console-v3/Chart.yaml +++ b/charts/console-v3/Chart.yaml @@ -29,13 +29,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: 3.5.1 +version: 4.0.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: "v2.5.1" +appVersion: "v3.0.0" # The "-0" suffix is required for GKE compatibility. GKE versions contain # build metadata like "v1.33.5-gke.2392000" which semver treats as pre-release. # Without "-0", Helm rejects these versions as incompatible. diff --git a/charts/console-v3/README.md b/charts/console-v3/README.md index 4dc8dfe8..3e812373 100644 --- a/charts/console-v3/README.md +++ b/charts/console-v3/README.md @@ -1,6 +1,6 @@ # console-v3 -![Version: 3.5.1](https://img.shields.io/badge/Version-3.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.5.1](https://img.shields.io/badge/AppVersion-v2.5.1-informational?style=flat-square) +![Version: 4.0.0](https://img.shields.io/badge/Version-4.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.0.0](https://img.shields.io/badge/AppVersion-v3.0.0-informational?style=flat-square) Formance Console @@ -88,6 +88,8 @@ Kubernetes: `>=1.14.0-0` | Key | Type | Default | Description | |-----|------|---------|-------------| +| config.migration.args | list | `["dist/migrate.cjs"]` | Migrate-job args. The bundled runner reads SQL files from `./dist/migrations` (set via `MIGRATIONS_FOLDER` env in the image). | +| config.migration.command | list | `["node"]` | Migrate-job command. Defaults to the bundled CJS migration runner shipped at `dist/migrate.cjs` by platform-ui#1195. | | config.migration.enabled | bool | `true` | Enable migration job with a separated user | ### Console configuration @@ -127,6 +129,7 @@ Kubernetes: `>=1.14.0-0` | global.nats.requestTimeout | string | `"60s"` | | | affinity | object | `{}` | Console affinity | | annotations | object | `{}` | Console annotations | +| args | list | `["./build/server/index.js"]` | Entrypoint args for the console-v3 container. | | autoscaling.enabled | bool | `false` | | | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | @@ -136,6 +139,7 @@ Kubernetes: `>=1.14.0-0` | aws.targetGroups.http.serviceRef.port | string | `"{{ .Values.service.ports.http.port }}"` | Target group service reference port | | aws.targetGroups.http.targetGroupARN | string | `""` | Target group ARN | | aws.targetGroups.http.targetType | string | `"ip"` | Target group target type | +| command | list | `["node_modules/.bin/react-router-serve"]` | Entrypoint command for the console-v3 container. Defaults match the slim `prod-remix` image which has no `pnpm` (saved ~30 MB) and invokes the React Router server binary directly. | | config.additionalEnv | list | `[{"name":"FEATURES_DISABLED","value":"sessions"}]` | Console additional environment variables | | config.cookie.encryptionKey | string | `"changeMe00"` | is used to encrypt a cookie value | | config.cookie.existingSecret | string | `""` | is the name of the secret | diff --git a/charts/console-v3/templates/deployment.yaml b/charts/console-v3/templates/deployment.yaml index 99b8dc17..75caa623 100644 --- a/charts/console-v3/templates/deployment.yaml +++ b/charts/console-v3/templates/deployment.yaml @@ -34,11 +34,14 @@ spec: imagePullPolicy: {{.Values.image.pullPolicy}} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} + {{- with .Values.command }} command: - - pnpm + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.args }} args: - - run - - start:prod + {{- toYaml . | nindent 12 }} + {{- end }} ports: - containerPort: 3000 protocol: TCP diff --git a/charts/console-v3/templates/job.yaml b/charts/console-v3/templates/job.yaml index b997a7a5..ecab110a 100644 --- a/charts/console-v3/templates/job.yaml +++ b/charts/console-v3/templates/job.yaml @@ -34,11 +34,14 @@ spec: volumeMounts: {{- toYaml . | nindent 12 }} {{- end }} + {{- with .Values.config.migration.command }} command: - - pnpm + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.config.migration.args }} args: - - run - - db:migrate + {{- toYaml . | nindent 12 }} + {{- end }} env: {{- include "core.env.common" . | nindent 12 }} {{- include "core.monitoring" . | nindent 12 }} diff --git a/charts/console-v3/values.schema.json b/charts/console-v3/values.schema.json index 4b190f7a..211c4c71 100644 --- a/charts/console-v3/values.schema.json +++ b/charts/console-v3/values.schema.json @@ -8,6 +8,12 @@ "annotations": { "type": "object" }, + "args": { + "type": "array", + "items": { + "type": "string" + } + }, "autoscaling": { "type": "object", "properties": { @@ -60,6 +66,12 @@ } } }, + "command": { + "type": "array", + "items": { + "type": "string" + } + }, "config": { "type": "object", "properties": { @@ -108,6 +120,18 @@ "annotations": { "type": "object" }, + "args": { + "type": "array", + "items": { + "type": "string" + } + }, + "command": { + "type": "array", + "items": { + "type": "string" + } + }, "enabled": { "type": "boolean" }, diff --git a/charts/console-v3/values.yaml b/charts/console-v3/values.yaml index 892fe849..20c6079a 100644 --- a/charts/console-v3/values.yaml +++ b/charts/console-v3/values.yaml @@ -192,6 +192,16 @@ image: # -- image tag tag: "" +# -- Entrypoint command for the console-v3 container. Defaults match the +# slim `prod-remix` image which has no `pnpm` (saved ~30 MB) and invokes +# the React Router server binary directly. +command: + - node_modules/.bin/react-router-serve + +# -- Entrypoint args for the console-v3 container. +args: + - ./build/server/index.js + # -- image pull secrets imagePullSecrets: [] @@ -302,6 +312,19 @@ config: # -- Enable migration job with a separated user # @section -- Migration configuration enabled: true + + # -- Migrate-job command. Defaults to the bundled CJS migration runner + # shipped at `dist/migrate.cjs` by platform-ui#1195. + # @section -- Migration configuration + command: + - node + + # -- Migrate-job args. The bundled runner reads SQL files from + # `./dist/migrations` (set via `MIGRATIONS_FOLDER` env in the image). + # @section -- Migration configuration + args: + - dist/migrate.cjs + # postgresql: # auth: # # -- Name for a custom user to create (overrides `auth.username`) diff --git a/charts/formance/Chart.lock b/charts/formance/Chart.lock index e7e60205..8b91c3b2 100644 --- a/charts/formance/Chart.lock +++ b/charts/formance/Chart.lock @@ -7,6 +7,6 @@ dependencies: version: 3.9.8 - name: cloudprem repository: file://../cloudprem - version: 4.6.2 -digest: sha256:cb1d629d9bf2034ba50eefb8814795d12a0dc518ad6cf6ccf74d2ddcc3ee7427 -generated: "2026-05-22T16:42:16.78034+02:00" + version: 5.0.0 +digest: sha256:111cae7fec821c0f5bc6848f2f3e3ac7cf33a1ba37060d3a1c379fd28f134093 +generated: "2026-05-25T15:55:18.394703+02:00" diff --git a/charts/formance/Chart.yaml b/charts/formance/Chart.yaml index 39b028f9..70a57a91 100644 --- a/charts/formance/Chart.yaml +++ b/charts/formance/Chart.yaml @@ -10,7 +10,7 @@ maintainers: icon: "https://avatars.githubusercontent.com/u/84325077?s=200&v=4" type: application -version: 1.10.1 +version: 2.0.0 appVersion: "latest" # The "-0" suffix is required for GKE compatibility. GKE versions contain # build metadata like "v1.33.5-gke.2392000" which semver treats as pre-release. @@ -35,7 +35,7 @@ dependencies: - child: stacks parent: global.exports.stacks - name: cloudprem - version: 4.X + version: 5.X repository: "file://../cloudprem" tags: - EntrepriseEdition diff --git a/charts/formance/README.md b/charts/formance/README.md index 6c7bb8dc..b4ff00ef 100644 --- a/charts/formance/README.md +++ b/charts/formance/README.md @@ -1,6 +1,6 @@ # formance -![Version: 1.10.1](https://img.shields.io/badge/Version-1.10.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) Formance Platform - Unified Helm Chart @@ -22,10 +22,46 @@ Kubernetes: `>=1.14.0-0` | Repository | Name | Version | |------------|------|---------| -| file://../cloudprem | cloudprem | 4.X | +| file://../cloudprem | cloudprem | 5.X | | file://../regions | regions | 3.X | | oci://registry-1.docker.io/bitnamicharts | postgresql | 18.X | +## Migration + +### From v1.X.X To v2.0.0 + +#### Breaking changes + +This bump pulls in `cloudprem` v5, which in turn upgrades the `portal` and `console-v3` +subcharts to v4 (app `v3.0.0`). Both subcharts now default their container `command` / +`args` to the slim production image entrypoint +(`react-router-serve ./build/server/index.js`) and the migration runner to +`node dist/migrate.cjs`. Consumers still running the legacy `pnpm`-based images **must** +override these values to keep the previous behavior: + +```yaml +cloudprem: + portal: + command: ["pnpm"] + args: ["start"] + config: + migration: + command: ["pnpm"] + args: ["migrate", "up"] + + console-v3: + command: ["pnpm"] + args: ["start"] + config: + migration: + command: ["pnpm"] + args: ["migrate", "up"] +``` + +If you already pin a recent image tag shipping the slim entrypoint, no action is required. +See the [`cloudprem` migration notes](../cloudprem/README.md#from-v4xx-to-v500) for the +underlying change. + ## Values ### AWS configuration @@ -187,7 +223,11 @@ Kubernetes: `>=1.14.0-0` | Key | Type | Default | Description | |-----|------|---------|-------------| +| cloudprem.console-v3.config.migration.args | list | `["dist/migrate.cjs"]` | Migrate-job args. The bundled runner reads SQL files from `./dist/migrations` (set via `MIGRATIONS_FOLDER` env in the image). | +| cloudprem.console-v3.config.migration.command | list | `["node"]` | Migrate-job command. Defaults to the bundled CJS migration runner shipped at `dist/migrate.cjs` by platform-ui#1195. | | cloudprem.console-v3.config.migration.enabled | bool | `true` | Enable migration job with a separated user | +| cloudprem.portal.config.migration.args | list | `["dist/migrate.cjs"]` | Migrate-job args. The bundled runner reads SQL files from `./dist/migrations` (set via `MIGRATIONS_FOLDER` env in the image). | +| cloudprem.portal.config.migration.command | list | `["node"]` | Migrate-job command. Defaults to the bundled CJS migration runner shipped at `dist/migrate.cjs` by platform-ui#1195. | | cloudprem.portal.config.migration.enabled | bool | `true` | Enable migration job with a separated user | ### Console configuration @@ -293,6 +333,7 @@ Kubernetes: `>=1.14.0-0` | regions.stacks | object | `{}` | | | cloudprem.console-v3.affinity | object | `{}` | Console affinity | | cloudprem.console-v3.annotations | object | `{}` | Console annotations | +| cloudprem.console-v3.args | list | `["./build/server/index.js"]` | Entrypoint args for the console-v3 container. | | cloudprem.console-v3.autoscaling.enabled | bool | `false` | | | cloudprem.console-v3.autoscaling.maxReplicas | int | `100` | | | cloudprem.console-v3.autoscaling.minReplicas | int | `1` | | @@ -302,6 +343,7 @@ Kubernetes: `>=1.14.0-0` | cloudprem.console-v3.aws.targetGroups.http.serviceRef.port | string | `"{{ .Values.service.ports.http.port }}"` | Target group service reference port | | cloudprem.console-v3.aws.targetGroups.http.targetGroupARN | string | `""` | Target group ARN | | cloudprem.console-v3.aws.targetGroups.http.targetType | string | `"ip"` | Target group target type | +| cloudprem.console-v3.command | list | `["node_modules/.bin/react-router-serve"]` | Entrypoint command for the console-v3 container. Defaults match the slim `prod-remix` image which has no `pnpm` (saved ~30 MB) and invokes the React Router server binary directly. | | cloudprem.console-v3.config.additionalEnv | list | `[{"name":"FEATURES_DISABLED","value":"sessions"}]` | Console additional environment variables | | cloudprem.console-v3.config.cookie.encryptionKey | string | `"changeMe00"` | is used to encrypt a cookie value | | cloudprem.console-v3.config.cookie.existingSecret | string | `""` | is the name of the secret | @@ -443,10 +485,12 @@ Kubernetes: `>=1.14.0-0` | cloudprem.membership.volumes | list | `[]` | Membership volumes | | cloudprem.portal.affinity | object | `{}` | Portal affinity | | cloudprem.portal.annotations | object | `{}` | Portal annotations | +| cloudprem.portal.args | list | `["./build/server/index.js"]` | Entrypoint args for the portal container. | | cloudprem.portal.autoscaling.enabled | bool | `false` | | | cloudprem.portal.autoscaling.maxReplicas | int | `100` | | | cloudprem.portal.autoscaling.minReplicas | int | `1` | | | cloudprem.portal.autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| cloudprem.portal.command | list | `["node_modules/.bin/react-router-serve"]` | Entrypoint command for the portal container. Defaults match the slim `prod-remix` image which has no `pnpm` (saved ~30 MB) and invokes the React Router server binary directly. | | cloudprem.portal.config.additionalEnv | list | `[]` | Additional environment variables | | cloudprem.portal.config.cookie.existingSecret | string | `""` | Cookie existing secret | | cloudprem.portal.config.cookie.secret | string | `"changeMe2"` | Cookie secret | diff --git a/charts/formance/README.md.gotmpl b/charts/formance/README.md.gotmpl new file mode 100644 index 00000000..01e28ecf --- /dev/null +++ b/charts/formance/README.md.gotmpl @@ -0,0 +1,53 @@ +{{ template "chart.header" . }} + +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.badgesSection" . }} + +{{ template "chart.description" . }} + +{{ template "chart.homepageLine" . }} + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +## Migration + +### From v1.X.X To v2.0.0 + +#### Breaking changes + +This bump pulls in `cloudprem` v5, which in turn upgrades the `portal` and `console-v3` +subcharts to v4 (app `v3.0.0`). Both subcharts now default their container `command` / +`args` to the slim production image entrypoint +(`react-router-serve ./build/server/index.js`) and the migration runner to +`node dist/migrate.cjs`. Consumers still running the legacy `pnpm`-based images **must** +override these values to keep the previous behavior: + +```yaml +cloudprem: + portal: + command: ["pnpm"] + args: ["start"] + config: + migration: + command: ["pnpm"] + args: ["migrate", "up"] + + console-v3: + command: ["pnpm"] + args: ["start"] + config: + migration: + command: ["pnpm"] + args: ["migrate", "up"] +``` + +If you already pin a recent image tag shipping the slim entrypoint, no action is required. +See the [`cloudprem` migration notes](../cloudprem/README.md#from-v4xx-to-v500) for the +underlying change. + +{{ template "chart.valuesSection" . }} diff --git a/charts/portal/Chart.yaml b/charts/portal/Chart.yaml index 619e4444..9b060bbd 100644 --- a/charts/portal/Chart.yaml +++ b/charts/portal/Chart.yaml @@ -26,13 +26,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: 3.5.1 +version: 4.0.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: "v2.5.1" +appVersion: "v3.0.0" # The "-0" suffix is required for GKE compatibility. GKE versions contain # build metadata like "v1.33.5-gke.2392000" which semver treats as pre-release. # Without "-0", Helm rejects these versions as incompatible. diff --git a/charts/portal/README.md b/charts/portal/README.md index 87f03068..1bf9e061 100644 --- a/charts/portal/README.md +++ b/charts/portal/README.md @@ -1,6 +1,6 @@ # portal -![Version: 3.5.1](https://img.shields.io/badge/Version-3.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.5.1](https://img.shields.io/badge/AppVersion-v2.5.1-informational?style=flat-square) +![Version: 4.0.0](https://img.shields.io/badge/Version-4.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.0.0](https://img.shields.io/badge/AppVersion-v3.0.0-informational?style=flat-square) Formance Portal @@ -89,6 +89,8 @@ Kubernetes: `>=1.14.0-0` | Key | Type | Default | Description | |-----|------|---------|-------------| +| config.migration.args | list | `["dist/migrate.cjs"]` | Migrate-job args. The bundled runner reads SQL files from `./dist/migrations` (set via `MIGRATIONS_FOLDER` env in the image). | +| config.migration.command | list | `["node"]` | Migrate-job command. Defaults to the bundled CJS migration runner shipped at `dist/migrate.cjs` by platform-ui#1195. | | config.migration.enabled | bool | `true` | Enable migration job with a separated user | ### Portal configuration @@ -134,10 +136,12 @@ Kubernetes: `>=1.14.0-0` | global.platform.portal.oauth.client.scopes[3] | string | `"on_behalf"` | | | affinity | object | `{}` | Portal affinity | | annotations | object | `{}` | Portal annotations | +| args | list | `["./build/server/index.js"]` | Entrypoint args for the portal container. | | autoscaling.enabled | bool | `false` | | | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| command | list | `["node_modules/.bin/react-router-serve"]` | Entrypoint command for the portal container. Defaults match the slim `prod-remix` image which has no `pnpm` (saved ~30 MB) and invokes the React Router server binary directly. | | config.additionalEnv | list | `[]` | Additional environment variables | | config.cookie.existingSecret | string | `""` | Cookie existing secret | | config.cookie.secret | string | `"changeMe2"` | Cookie secret | diff --git a/charts/portal/templates/deployment.yaml b/charts/portal/templates/deployment.yaml index 9d34dbaf..894ec44b 100644 --- a/charts/portal/templates/deployment.yaml +++ b/charts/portal/templates/deployment.yaml @@ -34,11 +34,14 @@ spec: imagePullPolicy: {{.Values.image.pullPolicy}} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} + {{- with .Values.command }} command: - - pnpm + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.args }} args: - - run - - start:prod + {{- toYaml . | nindent 12 }} + {{- end }} ports: - containerPort: 3000 protocol: TCP diff --git a/charts/portal/templates/job.yaml b/charts/portal/templates/job.yaml index 4ff38287..ecab110a 100644 --- a/charts/portal/templates/job.yaml +++ b/charts/portal/templates/job.yaml @@ -34,11 +34,14 @@ spec: volumeMounts: {{- toYaml . | nindent 12 }} {{- end }} - command: - - pnpm + {{- with .Values.config.migration.command }} + command: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.config.migration.args }} args: - - run - - db:migrate + {{- toYaml . | nindent 12 }} + {{- end }} env: {{- include "core.env.common" . | nindent 12 }} {{- include "core.monitoring" . | nindent 12 }} diff --git a/charts/portal/values.schema.json b/charts/portal/values.schema.json index 2d234417..d061a26f 100644 --- a/charts/portal/values.schema.json +++ b/charts/portal/values.schema.json @@ -8,6 +8,12 @@ "annotations": { "type": "object" }, + "args": { + "type": "array", + "items": { + "type": "string" + } + }, "autoscaling": { "type": "object", "properties": { @@ -60,6 +66,12 @@ } } }, + "command": { + "type": "array", + "items": { + "type": "string" + } + }, "config": { "type": "object", "properties": { @@ -103,6 +115,18 @@ "annotations": { "type": "object" }, + "args": { + "type": "array", + "items": { + "type": "string" + } + }, + "command": { + "type": "array", + "items": { + "type": "string" + } + }, "enabled": { "type": "boolean" }, diff --git a/charts/portal/values.yaml b/charts/portal/values.yaml index d1c8995a..a9957a4b 100644 --- a/charts/portal/values.yaml +++ b/charts/portal/values.yaml @@ -183,6 +183,16 @@ image: # -- image tag tag: "" +# -- Entrypoint command for the portal container. Defaults match the slim +# `prod-remix` image which has no `pnpm` (saved ~30 MB) and invokes the +# React Router server binary directly. +command: + - node_modules/.bin/react-router-serve + +# -- Entrypoint args for the portal container. +args: + - ./build/server/index.js + imagePullSecrets: [] serviceAccount: @@ -259,6 +269,19 @@ config: # -- Enable migration job with a separated user # @section -- Migration configuration enabled: true + + # -- Migrate-job command. Defaults to the bundled CJS migration runner + # shipped at `dist/migrate.cjs` by platform-ui#1195. + # @section -- Migration configuration + command: + - node + + # -- Migrate-job args. The bundled runner reads SQL files from + # `./dist/migrations` (set via `MIGRATIONS_FOLDER` env in the image). + # @section -- Migration configuration + args: + - dist/migrate.cjs + # postgresql: # auth: # # -- Name for a custom user to create (overrides `auth.username`) diff --git a/flake.lock b/flake.lock index 78e09e2f..9f9fa9d0 100644 --- a/flake.lock +++ b/flake.lock @@ -23,12 +23,12 @@ }, "nixpkgs": { "locked": { - "lastModified": 1742422364, - "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=", - "rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc", - "revCount": 770807, + "lastModified": 1779508470, + "narHash": "sha256-Ap9KJX+5xHIn3bPIpfNgT6MEXdAECECwo4/rmlQD74M=", + "rev": "29916453413845e54a65b8a1cf996842300cd299", + "revCount": 1003640, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.770807%2Brev-a84ebe20c6bc2ecbcfb000a50776219f48d134cc/0195b626-8c1d-7fb9-9282-563af3d37ab9/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.1003640%2Brev-29916453413845e54a65b8a1cf996842300cd299/019e5626-8c96-7cc1-83dd-de1831a60fd0/source.tar.gz" }, "original": { "type": "tarball", @@ -40,15 +40,14 @@ "flake-parts": "flake-parts", "nixpkgs": [ "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" + ] }, "locked": { - "lastModified": 1743581611, - "narHash": "sha256-HDbRE9O1VstonL5iOA45SofSLvFJInVjk3YrxqXK/Y4=", + "lastModified": 1779713358, + "narHash": "sha256-1Ai5G8e8dT8fq45USayiYNE+WqApwcmMT9gA7fZZbSA=", "owner": "nix-community", "repo": "NUR", - "rev": "7774821fd8f71266b59c05eb6b82e6867f73e738", + "rev": "65e2b0ee404b1f39cd43a949b0459de70d4d987d", "type": "github" }, "original": { @@ -62,27 +61,6 @@ "nixpkgs": "nixpkgs", "nur": "nur" } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733222881, - "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49717b5af6f80172275d47a418c9719a31a78b53", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 163a6ee0..e780fc40 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,7 @@ outputs = { self, nixpkgs, nur }: let - goVersion = 23; + goVersion = 25; supportedSystems = [ "x86_64-linux"