Skip to content

utopia-planitia/msort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

msort

msort takes a list of kubernetes manifests as input and sorts them to produce a reproducible artifact.

Install

Please use go to download, compile and install the binary.

go get -u -v github.com/utopia-planitia/msort

Help

NAME:
   msort - sort yaml manifests

USAGE:
   msort [global options] command [command options] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --sort-keys     sort keys within each yaml document (default: false)
   --drop-tests    remove yaml documents with "test" in its name (default: false)
   --in-place, -i  update files in place (default: false)
   --help, -h      show help (default: false)

Example

Sort yaml documents within file.yaml by Kind, Name, and Namspace, then print the result to stdout.

msort --in-place --sort-keys file.yaml

Read file.yaml, sort by Kind, Name, and Namespace, then and sort maps by key and update the file.

msort --in-place --sort-keys file.yaml

Sort the output of helmfile template by Kind, Name, and Namespace, then remove kubernetes manifests with test in their name, then print to stdout and redirect to file.yaml.

helmfile template | msort --drop-tests > file.yaml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages