Skip to content

kdwils/splinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Splinter

A command-line tool to split or merge Kubernetes manifests.

Use case

Splinter simplifies working with large Kubernetes manifests.

It helps in scenarios where you need to:

  • Break down large manifests into manageable, individual files organized by resource type
  • Generate a kustomization.yaml to glue the individual files together

Or...

  • Recombine the individual files back into a single manifest

Installation

Using Go

go install github.com/kdwils/splinter@latest

From Releases

Download the latest binary from GitHub Releases

Usage

Commands

Command Description
split Split a single manifest into multiple files organized by resource kind
merge Merge multiple manifest files into a single output (prints to stdout by default)

Global Flags

Flag Short Required Description
--include -i No Files or directories to include
--output -o No Output directory/file path

Examples

Splitting Manifests

split gif

With the include flag

splinter split -i examples/merged/merged.yaml -o examples/split/

With an argument

splinter split examples/merged/merged.yaml -o examples/split/

Split and generate a Kustomization file:

splinter split -k -i examples/merged/merged.yaml -o examples/split/

Merging Manifests

merge gif

Merge multiple files into stdout:

splinter merge -i examples/split/

Merge into a specific file:

splinter merge -i examples/split/ -o examples/flatten/my-manifest.yaml

Working with Pipes

Split Helm output:

helm template my-release sealed-secrets/sealed-secrets | splinter split -o my-dir/

Split Helm output and include additional files:

helm template my-release sealed-secrets/sealed-secrets | splinter split -i existing.yaml -o my-dir/

Development

This project uses Nix for development environment consistency.

Assuming a working Nix installation:

Start the nix develop shell

nix develop .

Run tests

go test ./...

Build binary

go build

Run a command

go run main.go merge -i examples/split/

Acknowledgements

  • vhs to make the gifs in this readme

About

A simple command line tool for merging or separating kubernetes manifest files

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •