diff --git a/api/internal/target/kusttarget_configplugin.go b/api/internal/target/kusttarget_configplugin.go index 9a3c63086fe..652f2ded0fd 100644 --- a/api/internal/target/kusttarget_configplugin.go +++ b/api/internal/target/kusttarget_configplugin.go @@ -81,6 +81,7 @@ func (kt *KustTarget) configureBuiltinTransformers( builtinhelpers.ReplicaCountTransformer, builtinhelpers.ImageTagTransformer, builtinhelpers.ReplacementTransformer, + builtinhelpers.SortOrderTransformer, } { r, err := transformerConfigurators[bpt]( kt, bpt, builtinhelpers.TransformerFactories[bpt], tc) @@ -418,6 +419,13 @@ var transformerConfigurators = map[builtinhelpers.BuiltinPluginType]func( result = append(result, p) return result, nil }, + builtinhelpers.SortOrderTransformer: func( + kt *KustTarget, bpt builtinhelpers.BuiltinPluginType, f tFactory, _ *builtinconfig.TransformerConfig) ( + result []resmap.Transformer, err error) { + // SortOrderTransformer is only called for the top-level kustomization, + // so we don't wire the plugin here! + return result, nil + }, builtinhelpers.ReplicaCountTransformer: func( kt *KustTarget, bpt builtinhelpers.BuiltinPluginType, f tFactory, tc *builtinconfig.TransformerConfig) ( result []resmap.Transformer, err error) {