cluster-api: Index | Files

package yaml

import ""


Package Files


func ExtractClusterReferences Uses

func ExtractClusterReferences(out *ParseOutput, c *clusterv1.Cluster) (res []*unstructured.Unstructured)

func ExtractMachineReferences Uses

func ExtractMachineReferences(out *ParseOutput, m *clusterv1.Machine) (res []*unstructured.Unstructured)

func FromUnstructured Uses

func FromUnstructured(objs []unstructured.Unstructured) ([]byte, error)

FromUnstructured takes a list of Unstructured objects and converts it into a YAML

func JoinYaml Uses

func JoinYaml(yamls ...[]byte) []byte

JoinYaml takes a list of YAML files and join them ensuring each YAML that the yaml separator goes on a new line by adding \n where necessary

func NewYAMLDecoder Uses

func NewYAMLDecoder(r io.ReadCloser) streaming.Decoder

func ToUnstructured Uses

func ToUnstructured(rawyaml []byte) ([]unstructured.Unstructured, error)

ToUnstructured takes a YAML and converts it to a list of Unstructured objects

type ParseInput Uses

type ParseInput struct {
    File string

type ParseOutput Uses

type ParseOutput struct {
    Clusters            []*clusterv1.Cluster
    Machines            []*clusterv1.Machine
    MachineSets         []*clusterv1.MachineSet
    MachineDeployments  []*clusterv1.MachineDeployment
    UnstructuredObjects []*unstructured.Unstructured

func Parse Uses

func Parse(input ParseInput) (*ParseOutput, error)

Parse extracts runtime objects from a file.

func (*ParseOutput) Add Uses

func (p *ParseOutput) Add(o *ParseOutput) *ParseOutput

Add adds the other ParseOutput slices to this instance.

func (*ParseOutput) FindUnstructuredReference Uses

func (p *ParseOutput) FindUnstructuredReference(ref *corev1.ObjectReference) *unstructured.Unstructured

FindUnstructuredReference takes in an ObjectReference and tries to find an Unstructured object.

Package yaml imports 15 packages (graph) and is imported by 7 packages. Updated 2020-10-29. Refresh now. Tools for package owners.