-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup documentation for the build-in go plugin transformers and document AnnotationsTransformer.
- Loading branch information
1 parent
cd7ba17
commit 4c0da8b
Showing
3 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
site/content/en/docs/Reference/Transformers/AnnotationsTransformer.md
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,50 @@ | ||
--- | ||
title: "AnnotationsTransformer" | ||
linkTitle: "AnnotationsTransformer" | ||
date: 2023-07-21 | ||
weight: 2 | ||
description: > | ||
Specification of AnnotationsTransformer behavior | ||
--- | ||
<!-- [kustomization reference]: https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/ --> | ||
|
||
<!-- TODO(annasong): What is "weight"? What is this "kustomization reference"? --> | ||
<!-- TODO(annasong): Add Reference, Transformers, Utility/FieldSpec page descriptions --> | ||
|
||
## _AnnotationTransformer_ | ||
|
||
### Usage via `kustomization.yaml` | ||
|
||
#### field name: `commonAnnotations` | ||
|
||
Adds annotations (non-identifying metadata) to | ||
all resources. Like labels, these are key value | ||
pairs. | ||
|
||
```bash | ||
commonAnnotations: | ||
oncallPager: 800-555-1212 | ||
``` | ||
|
||
### Usage via `transformers` field | ||
|
||
#### Arguments | ||
|
||
> Annotations map\[string\]string | ||
> | ||
> FieldSpecs \[\][config.FieldSpec] | ||
#### Example | ||
> | ||
> ``` | ||
> apiVersion: builtin | ||
> kind: AnnotationsTransformer | ||
> metadata: | ||
> name: not-important-to-example | ||
> annotations: | ||
> app: myApp | ||
> greeting/morning: a string with blanks | ||
> fieldSpecs: | ||
> - path: metadata/annotations | ||
> create: true | ||
> ``` |
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,43 @@ | ||
--- | ||
title: "Transformers" | ||
linkTitle: "Transformers" | ||
weight: 1 | ||
description: > | ||
TODO | ||
--- | ||
|
||
{{% pageinfo %}} | ||
This is a placeholder page that shows you how to use this template site. | ||
{{% /pageinfo %}} | ||
|
||
If your project has an API, configuration, or other reference - anything that users need to look up that’s at an even lower level than a single task - put (or link to it) here. You can serve and link to generated reference docs created using Doxygen, | ||
Javadoc, or other doc generation tools by putting them in your `static/` directory. Find out more in [Adding static content](https://docsy.dev/docs/adding-content/content/#adding-static-content). For OpenAPI reference, Docsy also provides a [Swagger UI layout and shortcode](https://www.docsy.dev/docs/adding-content/shortcodes/#swaggerui) that renders [Swagger UI](https://swagger.io/tools/swagger-ui/) using any OpenAPI YAML or JSON file as source. | ||
|
||
|
||
A list of kustomize's built-in | ||
generators and transformers. | ||
|
||
For each, an example is given for | ||
|
||
* triggering the feature via a dedicated kustomization | ||
file field (e.g. the `AnnotationsTransformer` is | ||
triggered by the `commonAnnotations` field). | ||
|
||
* triggering the feature via the `generators` or `transformers` field | ||
(by providing a config file specifying the feature's own configuration object). | ||
|
||
The former method is convenient but limited in | ||
power as most of the configuration options must | ||
be defaulted. The latter method allows for | ||
complete argument specification. | ||
|
||
[types.GeneratorOptions]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/generatoroptions.go | ||
[types.SecretArgs]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/secretargs.go | ||
[types.ConfigMapArgs]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/configmapargs.go | ||
[config.FieldSpec]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/fieldspec.go | ||
[types.ObjectMeta]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/objectmeta.go | ||
[types.Selector]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/selector.go | ||
[types.Replica]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/replica.go | ||
[types.PatchStrategicMerge]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/patchstrategicmerge.go | ||
[types.PatchTarget]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/patchtarget.go | ||
[image.Image]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/image.go |
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