Skip to content

Split up Kubernetes manifests into directories suitable for Anthos Config Management

License

Notifications You must be signed in to change notification settings

munnerz/manifest-splitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

manifest-splitter

This is a super simple tool that can be used to split up Kubernetes manifests into directories named after the namespace they exist within.

This is great for users using Anthos Config Management, which requires all manifests to be sorted into namespace-named directories.

Support level

This is a pet-project, created to serve my own needs. Whilst others may find it useful, this is not a product and I will not be able to provide timely responses.

Usage

To run the manifest splitter, a Kubernetes apiserver must be available in order to determine whether a given resource is namespace or cluster scoped.

To run the manifest-splitter and split up a bunch of manifests into a single config directory, run the following from within this repo:

$ go run . --kubeconfig $HOME/.kube/config --output=/path/to/output/dir /path/to/manifests/to/split/*

The tool will not recurse through the input directories to find manifests. To recursively match all YAML files within a directory, use a glob like so:

/path/to/manifests/to/split/**/*.yaml

About

Split up Kubernetes manifests into directories suitable for Anthos Config Management

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages