From e8245bbcdf0d794ba609806a63738ac9441e7108 Mon Sep 17 00:00:00 2001 From: Uri Zafrir Date: Tue, 3 Feb 2026 03:30:20 +0200 Subject: [PATCH 1/2] fix build, add gitignore Signed-off-by: Uri Zafrir --- .gitignore | 1 + site/content/en/_index.md | 1 + site/themes/docsy/layouts/partials/head.html | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b1cc0458f..537ef08f6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ publishedSite/ cover.out .DS_Store +site/.hugo_build.lock \ No newline at end of file diff --git a/site/content/en/_index.md b/site/content/en/_index.md index 764f557a2..9cbed831d 100644 --- a/site/content/en/_index.md +++ b/site/content/en/_index.md @@ -52,3 +52,4 @@ Join the community on Slack {{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/kubernetesio" url_text="Follow us" %}} For announcement of latest features, etc. {{% /blocks/feature %}} +{{< /blocks/section >}} diff --git a/site/themes/docsy/layouts/partials/head.html b/site/themes/docsy/layouts/partials/head.html index 28b45f471..9c943a3be 100644 --- a/site/themes/docsy/layouts/partials/head.html +++ b/site/themes/docsy/layouts/partials/head.html @@ -12,7 +12,7 @@ {{ partialCached "favicons.html" . }} {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }} {{- template "_internal/opengraph.html" . -}} -{{- template "_internal/google_news.html" . -}} +{{/* {{- template "_internal/google_news.html" . -}} */}} {{- template "_internal/schema.html" . -}} {{- template "_internal/twitter_cards.html" . -}} {{ if eq (getenv "HUGO_ENV") "production" }} From 0c01939c0a48a4e574e3f93c3729af7f0e696c9e Mon Sep 17 00:00:00 2001 From: Uri Zafrir Date: Tue, 3 Feb 2026 03:40:11 +0200 Subject: [PATCH 2/2] add configuration builtin Signed-off-by: Uri Zafrir --- .../references/kustomize/builtins/_index.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/site/content/en/references/kustomize/builtins/_index.md b/site/content/en/references/kustomize/builtins/_index.md index 5bbc4a3de..4866caf95 100644 --- a/site/content/en/references/kustomize/builtins/_index.md +++ b/site/content/en/references/kustomize/builtins/_index.md @@ -35,6 +35,71 @@ complete argument specification. [types.PatchTarget]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/patchtarget.go [image.Image]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/image.go +## _Configurations_ + +### Usage via `kustomization.yaml` + +#### field name: `configurations` + +The `configurations` field allows you to specify transformer configuration files that customize how built-in transformers behave. These configurations define fieldSpecs that specify which fields in resources should be modified by transformers like namePrefix, nameSuffix, labels, annotations, and nameReference. + +This is particularly useful when: +- You have custom resources that need to be updated by transformers +- You need to specify custom paths for label/annotation injection +- You want to configure how name references are updated for custom resources + +```bash +configurations: +- transformer.config +``` + +### Configuration File Structure + +The configuration file can contain the following sections: + +- **namePrefix**: Specifies which fields should have the name prefix applied +- **nameSuffix**: Specifies which fields should have the name suffix applied +- **commonLabels**: Specifies which fields should have labels applied +- **commonAnnotations**: Specifies which fields should have annotations applied +- **nameReference**: Specifies which fields reference resources by name (e.g., ConfigMap, Secret) and should be updated when those resources are renamed +- **varReference**: Specifies which fields contain variable references +- **images**: Specifies which fields contain image references +- **replicas**: Specifies which fields contain replica counts + +#### Example Configuration + +```yaml +nameReference: +- kind: Secret + version: v1 + fieldSpecs: + - path: spec/bootstrap/initdb/secret/name + kind: Cluster + group: postgresql.cnpg.io + version: v1 + - path: spec/containers/env/valueFrom/secretKeyRef/name + kind: Pod + group: "" + version: v1 + +commonLabels: +- path: metadata/labels + create: true +- path: spec/selector + create: true + +namePrefix: +- path: metadata/name +``` + +This configuration tells Kustomize to: +1. Update `spec/bootstrap/initdb/secret/name` in Cluster resources when Secret names change +2. Update `spec/containers/env/valueFrom/secretKeyRef/name` in Pod resources when Secret names change +3. Add labels to `metadata/labels` and `spec/selector` fields +4. Apply name prefix to `metadata/name` fields + +For more examples, see the [transformerconfigs examples](/examples/transformerconfigs/). + ## _AnnotationTransformer_ ### Usage via `kustomization.yaml`