Skip to content

Commit

Permalink
Document AnnotationsTransformer on site
Browse files Browse the repository at this point in the history
Dcoument AnnotationsTransformer API under Reference on site.
  • Loading branch information
annasong20 committed Jul 29, 2023
1 parent 10cdfa7 commit 95b41df
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 1 deletion.
32 changes: 32 additions & 0 deletions site/content/en/docs/Reference/API/Common Definitions/FieldSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: "FieldSpec"
linkTitle: "FieldSpec"
weight: 1
date: 2023-07-28
description: >
FieldSpec specifies a field for Kustomize to target.
---

* **group** (string)

Kubernetes group that this FieldSpec applies to. If empty, this FieldSpec
applies to all groups. Currently, there is no way to specify only the core
group, which is also represented by the empty string.

* **version** (string)

Kubernetes version that this FieldSpec applies to. If empty, this FieldSpec
applies to all versions.

* **kind** (string)

Kubernetes kind that this FieldSpec applies to. If empty, this FieldSpec
applies to all kinds.

* **path** (string)

Path to target field. Fields in path are delimited by forward slashes "/".

* **create** (bool)

If true, creates fields in **path** not already present.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Common Definitions"
linkTitle: "Common Definitions"
weight: 10
date: 2023-07-28
description: >
Common definitions are fields used across the Kustomize API.
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "AnnotationsTransformer"
linkTitle: "AnnotationsTransformer"
weight: 1
date: 2023-07-28
description: >
AnnotationsTransformer adds annotations to user-input resources.
---

* **apiVersion**: builtin
* **kind**: AnnotationsTransformer
* **metadata** ([ObjectMeta](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta))
* **annotations** (map[string]string)

Map of annotations that AnnotationsTransformer will add to resources.

* fieldSpecs (\[\][FieldSpec](../Common%20Definitions/FieldSpec.md))

fieldSpecs specifies the field on each resource that AnnotationsTransformer
should add the annotations to. It essentially allows the user to re-define
the field path of the Kubernetes annotations field from `metadata/annotations`
for different resources.

If not specified, AnnotationsTransformer applies the annotations to the
`metadata/annotations` field of all resources.
8 changes: 8 additions & 0 deletions site/content/en/docs/Reference/API/Transformers/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Transformers"
linkTitle: "Transformers"
weight: 3
date: 2023-07-28
description: >
Transformers have the ability to modify user-input resources.
---
2 changes: 1 addition & 1 deletion site/content/en/docs/Reference/API/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ linkTitle: "API"
weight: 2
date: 2023-07-28
description: >
API consists of the resources that specify Kustomize behavior.
The Kustomize API is the set of custom resources that define its behavior.
---

0 comments on commit 95b41df

Please sign in to comment.