mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 08:20:59 +00:00
Add common Tasks to documentation (#5383)
* Add labels, annotations, namespaces, and names tasks * Remove redundant information from ref/labels ref/annotations * Update labels and annotations example names for consistency * Remove name, prefix and suffix api examples * Add link to tasks in reference * Add link to tasks section for ref/configMapGenerator and ref/secretGenerator * Add Labels/Annotatations headers * Add Labels * Add Template Labels * Cleanup Add Template Labels * Consolidate commonLabels and labels.includeSelectors * Improve commonAnnotations example * Add labels and annotations ref links * Add generated ConfigMap to namespace example * Add name headers * Change header weights so they appear in sidebar * Add namespace/name links * Add generated ConfigMap to namePrefix example * Add name propagation example * Add more description of name propagation * template labels * Address feedback for labels * Address names feedback * Update for consistency * Address feedback * Remove API
This commit is contained in:
@@ -7,51 +7,4 @@ description: >
|
||||
Appends the value to the names of all resources and references.
|
||||
---
|
||||
|
||||
As `nameSuffix` is self explanatory, it helps adding suffix to names in the defined yaml files.
|
||||
|
||||
**Note:** The suffix is appended before the content hash if the resource type is ConfigMap or Secret.
|
||||
|
||||
## Example
|
||||
|
||||
### File Input
|
||||
|
||||
```yaml
|
||||
# deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: the-deployment
|
||||
spec:
|
||||
replicas: 5
|
||||
template:
|
||||
containers:
|
||||
- name: the-container
|
||||
image: registry/container:latest
|
||||
```
|
||||
|
||||
```yaml
|
||||
# kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
nameSuffix: -custom-suffix
|
||||
|
||||
resources:
|
||||
- deployment.yaml
|
||||
|
||||
```
|
||||
|
||||
### Build Output
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: the-deployment-custom-suffix
|
||||
spec:
|
||||
replicas: 5
|
||||
template:
|
||||
containers:
|
||||
- image: registry/container:latest
|
||||
name: the-container
|
||||
```
|
||||
The Tasks section contains examples of how to use [`nameSuffix`](/docs/tasks/namespaces_and_names/).
|
||||
|
||||
Reference in New Issue
Block a user