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 https://github.com/helm/helm/issues/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:
When we need to use custom JS transform in Replicator, we specify
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 https://github.com/helm/helm/issues/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 overwritetransform.js
file content:values.yml
should overwritetransform
section:Local file
local-transform.js
should define transformations / filters as per https://replicator.eventstore.org/docs/features/transforms/js/.Refs: https://github.com/EventStore/replicator/issues/74