Add kustomization and transformer references (#5523)

* Add fields to kustomization file ref

* Address grammar feedback.

* labels.fields
This commit is contained in:
Nick
2024-02-26 10:25:24 -08:00
committed by GitHub
parent 6ffcc08591
commit d3329453a2
10 changed files with 219 additions and 10 deletions

View File

@@ -4,7 +4,18 @@ linkTitle: "commonAnnotations"
type: docs
weight: 3
description: >
Add annotations to add all resources.
Add Annotations to all resources.
---
`apiVersion: kustomize.config.k8s.io/v1beta1`
The Tasks section contains examples of how to use [`commonAnnotations`](/docs/tasks/labels_and_annotations/).
See the [Tasks section] for examples of how to use `commonAnnotations`.
### commonAnnotations
Adds [Annotations] to all resources.
* **commonAnnotations** (map[string]string)
Map of annotations to add to all resources.
[Tasks section]: /docs/tasks/labels_and_annotations/
[Annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/

View File

@@ -4,7 +4,19 @@ linkTitle: "commonLabels"
type: docs
weight: 4
description: >
Add labels and selectors to add all resources.
Add Labels and Selectors to all resources.
---
`apiVersion: kustomize.config.k8s.io/v1beta1`
The Tasks section contains examples of how to use [`commonLabels`](/docs/tasks/labels_and_annotations/).
See the [Tasks section] for examples of how to use `commonLabels`.
### commonLabels
Adds [Labels and Selectors] to resources.
* **commonLabels** (map[string]string)
Map of labels to add to all resources. Labels will be added to resource selector and template fields where applicable.
[Tasks section]: /docs/tasks/labels_and_annotations/
[Labels and Selectors]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

View File

@@ -6,5 +6,35 @@ weight: 10
description: >
Add labels and optionally selectors to all resources.
---
`apiVersion: kustomize.config.k8s.io/v1beta1`
The Tasks section contains examples of how to use [`labels`](/docs/tasks/labels_and_annotations/).
See the [Tasks section] for examples of how to use `labels`.
### labels
Adds labels and optionally selectors to all resources.
* **labels** ([]Label)
List of labels and label selector options.
_Label holds labels to add to resources and options for customizing how those labels are applied, potentially using selectors and template metadata._
* **pairs** (map[string]string)
Map of labels that the transformer will add to resources.
* **includeSelectors** (bool), optional
IncludeSelectors indicates whether the transformer should include the fieldSpecs for selectors. Custom fieldSpec specified by `fields` will be merged with builtin fieldSpecs if this is true. Defaults to false.
* **includeTemplates** (bool), optional
IncludeTemplates indicates whether the transformer should include the `spec/template/metadata` fieldSpec. Custom fieldSpecs specified by `fields` will be merged with the `spec/template/metadata` fieldSpec if this is true. If IncludeSelectors is true, IncludeTemplates is not needed. Defaults to false.
* **fields** (\[\][FieldSpec]({{< relref "../Common%20Definitions/FieldSpec.md" >}})), optional
Fields specifies the field on each resource that LabelTransformer should add the label to. It essentially allows the user to re-define the field path of the Kubernetes labels field from `metadata/labels` for different resources.
[Tasks section]: /docs/tasks/labels_and_annotations/
[Labels and Selectors]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

View File

@@ -4,7 +4,18 @@ linkTitle: "namePrefix"
type: docs
weight: 11
description: >
Prepends the value to the names of all resources and references.
Add prefixes to the names of all resources.
---
`apiVersion: kustomize.config.k8s.io/v1beta1`
The Tasks section contains examples of how to use [`namePrefix`](/docs/tasks/namespaces_and_names/).
See the [Tasks section] for examples of how to use `namePrefix`.
### namePrefix
Add prefixes to the names of all resources.
* **namePrefix** (string)
NamePrefix will add a prefix to the names of all resources mentioned in the Kustomization file including generated resources such as ConfigMaps and Secrets.
[Tasks section]: /docs/tasks/namespaces_and_names/

View File

@@ -4,7 +4,18 @@ linkTitle: "nameSuffix"
type: docs
weight: 13
description: >
Appends the value to the names of all resources and references.
Add suffixes to the names of all resources.
---
`apiVersion: kustomize.config.k8s.io/v1beta1`
The Tasks section contains examples of how to use [`nameSuffix`](/docs/tasks/namespaces_and_names/).
See the [Tasks section] for examples of how to use `nameSuffix`.
### nameSuffix
Add suffixes to the names of all resources.
* **nameSuffix** (string)
NameSuffix will add a suffix to the names of all resources mentioned in the Kustomization file including generated resources such as ConfigMaps and Secrets.
[Tasks section]: /docs/tasks/namespaces_and_names/

View File

@@ -6,5 +6,16 @@ weight: 12
description: >
Adds namespace to all resources.
---
`apiVersion: kustomize.config.k8s.io/v1beta1`
The Tasks section contains examples of how to use [`namespace`](/docs/tasks/namespaces_and_names/).
See the [Tasks section] for examples of how to use `namespace`.
### namespace
Adds namespace to all resources.
* **namespace** (string)
Namespace to add to all resources. This will override Namespace values that already exist.
[Tasks section]: /docs/tasks/namespaces_and_names/