Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add extended ReplacementTransformer
This transformer works the same as the builtin one that it replaces but adds extended path specifications based on the _lenses_ of knot8. The typical use case for this is when you want to replace a value in the `values` field of an application: ```yaml values: | uninode: true apps: enabled: true common: targetRevision: main repoURL: https://github.com/anotherproject/anothergit ``` This commit allows you to write: ```yaml fieldPaths: ... - spec.source.helm.values.!!yaml.common.repoURL ``` Note the double exclamation point (!!) before `yaml`. This tells _change the `common.repoURL` value of the `spec.source.helm.values` property that is encoded in YAML. Apart from `yaml`, this commit add two other encodings: - `base64`, to decode/encode base64 based values. - `regex` to allow regexp based changes. Paths for this encoding have two elements. The first one is the regexp to match and the second one is the matching group index to replace. Example: ^\s+HostName\s+(\S+)\s*$.1 It means: Look for a line with `HostName` followed by a word and replace this word (matching group 1) with the value passed. [knot8]: https://github.com/mkmik/knot8
- Loading branch information