Skip to content

Conversation

@iblazhko
Copy link
Contributor

@iblazhko iblazhko commented Apr 24, 2023

When we need to use custom JS transform in Replicator, we specify

transform:
  type: js
  config: ./transform.js

in replicator configuration.

Problem is that this configuration references an external file that is currently not in Helm chart. Helm does not allow to mount external files into pod at the time of the deployment, see Helm issue helm/helm#3276.

This change adds a transform.js file into Helm chart that we can reference in our configuration during deployment. the content of this file is set from chart values, and we can overwrite this during installation.

By default, the transform file is not used and the content of transform.js is empty.

To use the transform, we need to overwrite transform section in application configuration, and overwrite transform.js file content:

helm install replicator-with-transform \
  es-replicator/es-replicator \
  --values values.yml \
  --set-file transformJs=./local-transform.js

values.yml should overwrite transform section:

transform:
  type: js
  config: ./transform.js

Local file local-transform.js should define transformations / filters as per https://replicator.eventstore.org/docs/features/transforms/js/.

Refs: #74

When we need to use custom JS transform in Replicator, we specify

    transform:
      type: js
      config: ./transform.js

in replicator configuration.

Problem is that this configuration references an external file
that is currently not in Helm chart. Helm does not allow to
mount external files into pod at the time of the deployment,
see Helm issue <helm/helm#3276>.

This change adds a `transform.js` file into Helm chart that
we can reference in our configuration during deployment. the content
if this file is set from chart values, and we can overwrite this
during installation.

Bu default, the transform file is not used and the content of
`transform.js` is empty.

To use the transform, we need to overwrite `transform` section
in application configuration, and overwrite `transform.js` file
itself:

    helm install replicator-with-transform \
      es-replicator/es-replicator \
      --values values.yml \
      --set-file transformJs=./local-transform.js

`values.yml` should overwrite `transform` section:

    transform:
      type: js
      config: ./transform.js

Local file `local-transform.js` should define transformations / filters
as per <https://replicator.eventstore.org/docs/features/transforms/js/>.
@alexeyzimarev
Copy link
Member

I need to check why the UI fails building.

@alexeyzimarev alexeyzimarev changed the title feat: Add Helm chart support for transform.js feat: Add Helm chart support for transform.js DEV-72 May 2, 2023
@josephcummings josephcummings changed the title feat: Add Helm chart support for transform.js DEV-72 DEV-72 - Add Helm chart support for transform.js Feb 5, 2024
@alexeyzimarev alexeyzimarev merged commit 7029b05 into kurrent-io:master Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants