Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToUnstructured ¶
func ToUnstructured(obj runtime.Object) (*unstructured.Unstructured, error)
ToUnstructured converts a runtime.Object into an Unstructured object.
Types ¶
type Applier ¶
type Applier struct {
// contains filtered or unexported fields
}
Applier is used to create/update/delete one or more objects from a YAML manifest file to the cluster @TODO: Remove this in favor of Client in client.go which provides server side apply
func NewApplier ¶
NewApplier creates an Applier instance
func (*Applier) Apply ¶
func (a *Applier) Apply(ctx context.Context, reader UnstructuredReader) error
Apply reads the manifest objects from the reader, and then either create or update the objects in the cluster. @TODO: Continue on failure to create/update object and return failed objects
func (*Applier) ApplyObjects ¶
func (a *Applier) ApplyObjects(ctx context.Context, objs []*unstructured.Unstructured) error
ApplyObjects create or update the provided objects in the cluster.
func (*Applier) Delete ¶
func (a *Applier) Delete(ctx context.Context, objs []*unstructured.Unstructured) error
Delete deletes the provided objects from the cluster.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper around the controller-runtime client.Client that provides a higher-level API for working with unstructured objects.
type UnstructuredReader ¶
type UnstructuredReader interface {
ReadManifest() ([]*unstructured.Unstructured, error)
}
UnstructuredReader an interface that all manifest readers should implement
func NewManifestReader ¶
func NewManifestReader(manifest []byte) UnstructuredReader
NewManifestReader initializes a reader for yaml manifests