Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brendanjryan/k8split
A CLI for splitting multidocument yaml files into discrete documents.
https://github.com/brendanjryan/k8split
go kubernetes kustomize yaml
Last synced: about 1 month ago
JSON representation
A CLI for splitting multidocument yaml files into discrete documents.
- Host: GitHub
- URL: https://github.com/brendanjryan/k8split
- Owner: brendanjryan
- Created: 2019-09-24T13:22:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T14:00:41.000Z (over 1 year ago)
- Last Synced: 2024-08-02T01:25:50.155Z (4 months ago)
- Topics: go, kubernetes, kustomize, yaml
- Language: Go
- Homepage:
- Size: 2.14 MB
- Stars: 28
- Watchers: 4
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-repositories - brendanjryan/k8split - A CLI for splitting multidocument yaml files into discrete documents. (Go)
README
`k8split`
---A CLI for splitting multidocument yaml files into discrete documents. Useful when converting k8s manifests to be fed into `kustomize`.
## Details
Documents are named by their "kind" and a numerical postfix. For example, a document with two `Deployment` objects would produce the files `deployment.yaml` and `deployment_1.yaml`.
## Installation
```console
go get -u github.com/brendanjryan/k8split
```## Usage
Default:
```console
k8split file.yaml
```To specify an output folder:
```console
k8split -o /split file.yaml
```## Example
```console
⇒ k8split config.yaml
2019/09/23 15:45:55 splitting config.yaml...
2019/09/23 15:45:55 split file into 8 chunks
2019/09/23 15:45:55 Writing file: namespace.yaml
2019/09/23 15:45:55 Writing file: deployment.yaml
2019/09/23 15:45:55 Writing file: ingress.yaml
2019/09/23 15:45:55 Writing file: service.yaml
2019/09/23 15:45:55 Writing file: cluster_role.yaml
2019/09/23 15:45:55 Writing file: service_account.yaml
2019/09/23 15:45:55 Writing file: cluster_role_binding.yaml
2019/09/23 15:45:55 Writing file: deployment_1.yaml
```