Skip to content

Commit f4727fe

Browse files
authored
Merge pull request #1734 from carloslima/document-postrender-annotation
Document the annotation added to manifests passed to the post-renderer
2 parents 638db6f + ed4b0a8 commit f4727fe

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/topics/advanced.mdx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ non-0 exit code in the event of a failure. This is the only "API" between the
3636
two components. It allows for great flexibility in what you can do with your
3737
post-render process.
3838

39-
A post renderer can be used with `install`, `upgrade`, and `template`. To use a
39+
A post-renderer can be used with `install`, `upgrade`, and `template`. To use a
4040
post-renderer, use the `--post-renderer` flag with a path to the renderer
4141
executable you wish to use:
4242

@@ -51,9 +51,19 @@ If you wish to use multiple post-renderers, call all of them in a script or
5151
together in whatever binary tool you have built. In bash, this would be as
5252
simple as `renderer1 | renderer2 | renderer3`.
5353

54-
You can see an example of using `kustomize` as a post renderer
54+
You can see an example of using `kustomize` as a post-renderer
5555
[here](https://github.com/thomastaylor312/advanced-helm-demos/tree/master/post-render).
5656

57+
#### Filenames
58+
Each manifest passed to the post-renderer includes a temporary annotation:
59+
```yaml
60+
metadata:
61+
annotations:
62+
postrenderer.helm.sh/postrender-filename: <original-template-filename>
63+
```
64+
65+
Helm uses this annotation when reading back the post-renderer’s output to determine which filename to associate with each manifest for further processing. If the annotation is missing, Helm auto-generates a filename in the format `generated-by-postrender-<id>.yaml`. Finally, Helm removes the annotation before sending the manifests to Kubernetes.
66+
5767
### Caveats
5868
When using post renderers, there are several important things to keep in mind.
5969
The most important of these is that when using a post-renderer, all people

0 commit comments

Comments
 (0)