-
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.
Document AnnotationsTransformer (#5247)
* Restructure existing Reference docs Restructure Reference section for site to better match k8s.io. Change descriptions to complete sentences. Improve instructions to locally load site. * Document AnnotationsTransformer on site Dcoument AnnotationsTransformer API under Reference on site. * Document required fields Document required fields and explain effects of optional ones. * Make site setup instructions more explicit * Link required K8s fields
- Loading branch information
1 parent
985835f
commit 7c36ed2
Showing
11 changed files
with
134 additions
and
33 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
32 changes: 32 additions & 0 deletions
32
site/content/en/docs/Reference/API/Common Definitions/FieldSpec.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,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. |
8 changes: 8 additions & 0 deletions
8
site/content/en/docs/Reference/API/Common Definitions/_index.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,8 @@ | ||
--- | ||
title: "Common Definitions" | ||
linkTitle: "Common Definitions" | ||
weight: 10 | ||
date: 2023-07-28 | ||
description: > | ||
Common definitions are fields used across the Kustomize API. | ||
--- |
29 changes: 29 additions & 0 deletions
29
site/content/en/docs/Reference/API/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,29 @@ | ||
--- | ||
title: "AnnotationsTransformer" | ||
linkTitle: "AnnotationsTransformer" | ||
weight: 1 | ||
date: 2023-07-28 | ||
description: > | ||
AnnotationsTransformer adds annotations to user-input resources. | ||
--- | ||
|
||
See [Transformers]({{< relref "../Transformers" >}}) for common required fields. | ||
|
||
* **apiVersion**: builtin | ||
* **kind**: AnnotationsTransformer | ||
* **metadata** ([ObjectMeta](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta)) | ||
|
||
Standard object's metadata. | ||
|
||
* **annotations** (map[string]string) | ||
|
||
Map of annotations that AnnotationsTransformer will add to resources. | ||
|
||
If not specified, AnnotationsTransformer leaves the resources unchanged. | ||
|
||
* **fieldSpecs** (\[\][FieldSpec]({{< relref "../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. |
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,16 @@ | ||
--- | ||
title: "Transformers" | ||
linkTitle: "Transformers" | ||
weight: 3 | ||
date: 2023-07-28 | ||
description: > | ||
Transformers have the ability to modify user-input resources. | ||
--- | ||
|
||
Transformers are Kubernetes objects that dictate how Kustomize changes other Kubernetes objects that users provide. | ||
Besides `spec`, transformers require the same [fields](https://kubernetes.io/docs/concepts/overview/working-with-objects/#required-fields), listed below, as other Kubernetes objects: | ||
|
||
* `apiVersion` | ||
* `kind` | ||
* `metadata` | ||
* `name` |
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,11 @@ | ||
--- | ||
title: "API" | ||
linkTitle: "API" | ||
weight: 2 | ||
date: 2023-07-28 | ||
description: > | ||
The Kustomize API is the set of custom resources that define its behavior. | ||
--- | ||
|
||
This section contains user-friendly definitions of resources custom to Kustomize that define its behavior. | ||
Required fields are marked as such. |
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,8 @@ | ||
--- | ||
title: "CLI" | ||
linkTitle: "CLI" | ||
weight: 3 | ||
date: 2023-07-28 | ||
description: > | ||
The command line tools to interact with Kustomize. | ||
--- |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
title: "Glossary" | ||
linkTitle: "Glossary" | ||
weight: 3 | ||
date: 2017-01-05 | ||
weight: 1 | ||
date: 2023-07-28 | ||
description: > | ||
Definitions of the terminology used when interacting with kustomize | ||
Glossary defines terminology used to interact with Kustomize. | ||
--- |
This file was deleted.
Oops, something went wrong.