#6054·kustomize

Add exclude support for PrefixTransformer and SuffixTransformer

Author: stillyaCreated Feb 2, 2026Updated Aug 18, 2026
Labelstriage/needs-informationkind/feature

Eschewed features

  • This issue is not requesting templating, unstuctured edits, build-time side-effects from args or env vars, or any other eschewed feature.

What would you like to have added?

Add an excludeLabelSelector field to both PrefixTransformer and SuffixTransformer that allows users to specify a label selector. Resources matching this selector will be excluded from the prefix/suffix transformation.

Why is this needed?

When using namePrefix or nameSuffix in kustomize, there is currently no way to exclude specific resources from the transformation based on their labels. This becomes problematic when you have shared/global resources that should retain their original names while other resources in the same kustomization need prefixes or suffixes.

Can you accomplish the motivating task without this feature, and if so, how?

I don't think so.

What other solutions have you considered?

Split resources into two groups: one overlay with prefix/suffix, another without. Then combine them in a final overlay, but it so complex and have a lot of boilerplate

Anything else we should know?

No response

Feature ownership

  • I am interested in contributing this feature myself!

Source: kubernetes-sigs/kustomize