kustomize

package
v1.16.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package kustomize contains helpers for working with embedded kustomize commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager define a manager that allow access to kustomize capabilities

func GetManager

func GetManager(kustomizeDir string) (*Manager, error)

GetManager return the KustomizeManager singleton instance

func (*Manager) Kustomize

func (km *Manager) Kustomize(res []byte) ([]byte, error)

Kustomize apply a set of patches to a resource. Portions of the kustomize logic in this function are taken from the kubernetes-sigs/kind project

type UnstructuredSlice

type UnstructuredSlice []*unstructured.Unstructured

UnstructuredSlice is a slice of Unstructured objects. Unstructured objects are used to represent both resources and patches of any group/version/kind.

func NewUnstructuredSliceFromBytes

func NewUnstructuredSliceFromBytes(in []byte) (UnstructuredSlice, error)

NewUnstructuredSliceFromBytes returns a slice of Unstructured. This functions handles all the nuances of Kubernetes yaml (e.g. many yaml documents in one file, List of objects)

func NewUnstructuredSliceFromFiles

func NewUnstructuredSliceFromFiles(loader ifc.Loader, paths []string) (UnstructuredSlice, error)

NewUnstructuredSliceFromFiles returns a ResMap given a resource path slice. This func use a Loader to mimic the behavior of kubectl kustomize, and most specifically support for reading from a local git repository like git@github.com:someOrg/someRepo.git or https://github.com/someOrg/someRepo?ref=someHash

func (*UnstructuredSlice) FilterResource

func (rs *UnstructuredSlice) FilterResource(gvk schema.GroupVersionKind, namespace, name string) UnstructuredSlice

FilterResource returns all the Unstructured items in the UnstructuredSlice corresponding to a given resource

Jump to

Keyboard shortcuts

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