Skip to main content

Split multidoc yaml formatted kubernetes descriptors to a set of single resource files

Project description

kubesplit

https://img.shields.io/pypi/v/kubesplit.svg https://circleci.com/gh/looztra/kubesplit.svg?style=svg

Split multidoc yaml formatted kubernetes descriptors to a set of single resource files

Features

  • Invalid Kubernetes resources are ignored
  • Empty resources are ignored
  • Each resource found in the input is stored in a file with a name reflecting the name of the resource and its _kubernetes_ kind
  • Cluster-wide resources (namespaces, clusterroles, clusterrolebindings) are stored in the root directory of the output, namespaced resources are stored in a subdirectory named like the namespace
  • By default, resources are prefixed
  • By default, quotes are preserved, use –no-quotes-preserved to disable quotes unless needed (for boolean and numbers if they were provided in the input as for the moment Kubesplit is not aware of the fact that only kubernetes annotations and environment variables require string)
  • By default, dash elements in list are pushed inwards, you can disable this behaviour with the -d/–no-dash-inwards option
  • Comments are preserved
  • The output directory will be created if it doesn’t exist (if the user running the command as sufficient rights)
  • You can clean (delete files and directories existing before running kubesplit) the output directory with the -c/–clean-output-dir (use at your own risks)

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2019-06-16)

  • First release on PyPI.

0.2.0 (2019-06-16)

  • Fix yaml formatting application
  • Allow unprefixed resource files
  • Support for ReplicaSets order

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kubesplit, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size kubesplit-0.2.0-py2.py3-none-any.whl (8.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size kubesplit-0.2.0.tar.gz (13.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page