mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 01:46:23 +00:00
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
This commit is contained in:
@@ -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.
|
||||
16
site/content/en/docs/Reference/API/Transformers/_index.md
Normal file
16
site/content/en/docs/Reference/API/Transformers/_index.md
Normal file
@@ -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`
|
||||
Reference in New Issue
Block a user