-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c83f71
commit daa49c6
Showing
11 changed files
with
391 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
Package extras contains additional utility transformers and generators. | ||
[GitConfigMapGeneratorPlugin] is identical to ConfigMapGeneratorPlugin | ||
but automatically creates two properties when run inside a git repository: | ||
- repoURL gives the URL of the origin remote. | ||
- targetRevision gives the current branch. | ||
[ExtendedReplacementTransformerPlugin] is a copy of ReplacementTransformerPlugin | ||
that provides extended target paths into embedded data structures. For instance, | ||
consider the following resource snippet: | ||
helm: | ||
parameters: | ||
- name: common.targetRevision | ||
# This resource is accessible by traditional transformer | ||
value: deploy/citest | ||
- name: common.repoURL | ||
value: https://github.com/antoinemartin/autocloud.git | ||
values: | | ||
uninode: true | ||
apps: | ||
enabled: true | ||
common: | ||
# This embedded resource is not accessible | ||
targetRevision: deploy/citest | ||
repoURL: https://github.com/antoinemartin/autocloud.git | ||
In the above, the common.targetRevision property of the yaml embedded in the | ||
spec.source.helm.values property is not accessible with the traditional | ||
ReplacementTransformerPlugin. With the extended transformer, you can target | ||
it with: | ||
fieldPaths: | ||
- spec.source.helm.parameters.[name=common.targetRevision].value | ||
- spec.source.helm.values.!!yaml.common.targetRevision | ||
Note the use of !!yaml to designate the encoding of the embedded structure. The | ||
extended transformer supports the following encodings: | ||
- YAML | ||
- JSON | ||
- TOML | ||
- INI | ||
- base64 | ||
- Plain text (with Regexp) | ||
*/ | ||
package extras |
Oops, something went wrong.