A tool to sort Kustomize manifests into kind based directories
This is a command line tool for refactoring of Kustomize manifests.
It sorts manifests into kind based directories. For example,
.
├── deployment
│ └── hello-world.yaml
├── service
│ └── hello-world.yaml
├── ingress
│ └── hello-world.yaml
└── kustomization.yaml
It finds kustomization.yaml
and performs the following steps for each kustomization.yaml
:
kustomize build
.resources
and patchesStrategicMerge
.KIND/NAME.yaml
.
-${FOO}
) is removed.:
) is replaced with -
.kustomize build
.go get github.com/int128/kustomtree
You can exclude manifest(s) from refactoring by -exclude-path-regexp
flag.
For example, pass -exclude-path-regexp=^vendor/
to exclude files in vendor
directory, like:
.
├── deployment
│ └── hello-world.yaml
├── vendor
│ └── generated.yaml
└── kustomization.yaml
This is an open source software. Feel free to open issues and pull requests.