nameSuffix

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

  1. # deployment.yaml
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: the-deployment
  6. spec:
  7. replicas: 5
  8. template:
  9. containers:
  10. - name: the-container
  11. image: registry/conatiner:latest
  1. # kustomization.yaml
  2. apiVersion: kustomize.config.k8s.io/v1beta1
  3. kind: Kustomization
  4. nameSuffix: -custom-suffix
  5. resources:
  6. - deployment.yaml

Build Output

  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: the-deployment-custom-suffix
  5. spec:
  6. replicas: 5
  7. template:
  8. containers:
  9. - image: registry/conatiner:latest
  10. name: the-container