Skip to content

Commit

Permalink
plugins: Wire SortOrderTransformer with kustomization.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Yannis Zarkadas <[email protected]>
  • Loading branch information
yanniszark committed Nov 8, 2022
1 parent 3027ae8 commit 53c2798
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/internal/target/kusttarget_configplugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 53c2798

Please sign in to comment.