This section is empty.


This section is empty.


This section is empty.


type Object

type Object struct {
	Group     string
	Kind      string
	Name      string
	Namespace string

	// contains filtered or unexported fields


func NewObject

func NewObject(u *unstructured.Unstructured) (*Object, error)

func ParseJSONToObject

func ParseJSONToObject(json []byte) (*Object, error)

func (*Object) AddLabels

func (o *Object) AddLabels(labels map[string]string)

func (*Object) GroupKind

func (o *Object) GroupKind() schema.GroupKind

func (*Object) GroupVersionKind

func (o *Object) GroupVersionKind() schema.GroupVersionKind

func (*Object) JSON

func (o *Object) JSON() ([]byte, error)

func (*Object) MutateContainers

func (o *Object) MutateContainers(fn func(map[string]interface{}) error) error

func (*Object) MutatePodSpec

func (o *Object) MutatePodSpec(fn func(map[string]interface{}) error) error

func (*Object) NestedStringMap

func (o *Object) NestedStringMap(fields ...string) (map[string]string, bool, error)

func (*Object) SetNestedField

func (o *Object) SetNestedField(value interface{}, fields ...string) error

func (*Object) SetNestedFieldNoCopy

func (o *Object) SetNestedFieldNoCopy(value interface{}, fields ...string) error

func (*Object) SetNestedSlice

func (o *Object) SetNestedSlice(value []interface{}, fields ...string) error

func (*Object) SetNestedStringMap

func (o *Object) SetNestedStringMap(value map[string]string, fields ...string) error

func (*Object) UnstructuredObject

func (o *Object) UnstructuredObject() *unstructured.Unstructured

UnstructuredContent exposes the raw object, primarily for testing

type Objects

type Objects struct {
	Items []*Object
	Blobs [][]byte
	Path  string

Objects holds a collection of objects, so that we can filter / sequence them

func ParseObjects

func ParseObjects(ctx context.Context, manifest string) (*Objects, error)

func (*Objects) JSONManifest

func (o *Objects) JSONManifest() (string, error)

func (*Objects) Patch

func (objects *Objects) Patch(patches []*unstructured.Unstructured) error

func (*Objects) Sort

func (o *Objects) Sort(score func(o *Object) int)

Sort will order the items in Objects in order of score, group, kind, name. The intent is to have a deterministic ordering in which Objects are applied.