Call stack when running kustomize build
, with links to code.
- RunBuild
- MakeKustomizer
- Run: performs a kustomization. It uses its internal filesystem reference to read the file at the given path argument, interpret it as a kustomization.yaml file, perform the kustomization it represents, and return the resulting resources.
- Create factories
- NewKustTarget
- Load
- MakeCustomizeResMap: details in next section
- emitResources
- makeCustomizeResMap
- AccumulateTarget: returns a new ResAccumulator, holding customized resources and the data/rules used to do so. The name back references and vars are not yet fixed.
- accummulateResources: fills the given resourceAccumulator with resources read from the given list of paths.
- Merge config from builtin and CRDs
- runGenerators
- configureBuiltinGenerators
- ConfigMapGenerator
- SecretGenerator
- configureExternalGenerators
- Iterate all generators
- configureBuiltinGenerators
- runTransfomers
- configureBuiltinTransformers
- PatchStrategicMergeTransformer
- PatchTransformer
- NamespaceTransformer
- PrefixSuffixTransformer
- LabelTransformer
- AnnotationsTransformer
- PatchJson6902Transformer
- ReplicaCountTransformer
- ImageTagTransformer
- configureExternalTransformers
- configureBuiltinTransformers
- MergeVars
- The following steps must be done last, not as part of the recursion implicit in AccumulateTarget.
- addHashesToNames
- FixBackReferences: Given that names have changed (prefixs/suffixes added), fix all the back references to those names.
- ResolveVars
- computeInventory
- AccumulateTarget: returns a new ResAccumulator, holding customized resources and the data/rules used to do so. The name back references and vars are not yet fixed.