yamleater

package module
v0.0.0-...-33f9b4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2020 License: MIT Imports: 10 Imported by: 0

README

k8s-yamleater

Read and de-serialize multiple Kubernetes YAML definitions from a single source

What's this ?

Do you have a headache on programmatically "kubectl apply" multiple pre-defined K8S resources from a single YAML file in your go code ?

This simple tool could help you develop your own "kubectl apply" in your app.

  • Extract a single&full K8S YAML document from multiple definitions
  • Unmarshall YAML definition to known Kubernetes struct runtime.Object
  • Support typed resources and CRDs
  • Maybe Server-side apply with discovery client ?

TODO

WIP

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ReadAhead defines the cache for reading YAML from source.
	// By default read 5 YAML documents ahead of decoding.
	// Change it before NewYamlEater.
	ReadAhead uint = 5
)

Functions

func NewYamlEater

func NewYamlEater(read interface{}) (*yamlEater, error)

NewYamlEater returns a YamlEater obj with given data source. The read source should be one of: []byte content, io.Reader, io.ReadCloser or a string representing a file path.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL