Add the transformer reference:
transformers:
- enforce-non-root.yamlRequires both flags with the standalone kustomize binary:
kustomize build config/overlays/odh --enable-alpha-plugins --enable-execkubectl kustomize --enable-alpha-plugins silently skips the exec function - use the standalone binary.
The enforce-non-root.sh KRM exec function receives the full ResourceList on stdin, uses yq's recursive descent (..) to find every object with a containers or initContainers array at any nesting depth within LLMInferenceServiceConfig resources, and sets securityContext.runAsNonRoot: true on each container. No path enumeration needed.
Resources labeled opendatahub.io/config-type=accelerator are skipped (they're minimal overrides that inherit securityContext from the base template).
- Requires
yq(v4) at build time - Needs
--enable-alpha-plugins --enable-execflags - Does NOT work when kustomize is invoked programmatically as a Go library (e.g. from a controller using
krusty.MakeKustomizer) - exec plugins aren't supported in that path