goply

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

README

goply

Apply/reconcile kubernetes resources from yaml

Makes heavy use of libraries & techniques found in fluxcd/kustomize-controller. Shoutout Stefan Prodan

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 5 * time.Minute
)

Variables

This section is empty.

Functions

func GetObjects added in v0.1.1

func GetObjects(yaml string) ([]*unstructured.Unstructured, error)

Types

type ApplyOpts

type ApplyOpts struct {
	WaitTimeout *time.Duration
	SkipWait    bool
}

type DeleteOpts

type DeleteOpts struct {
	WaitTimeout *time.Duration
	SkipWait    bool
}

type Inventory

type Inventory struct {
	Items []InventoryItem
}

func (Inventory) ItemsToRemove

func (i Inventory) ItemsToRemove(newInv Inventory) []*unstructured.Unstructured

type InventoryItem

type InventoryItem struct {
	object.ObjMetadata
	GroupVersion string
}

func (InventoryItem) ID

func (i InventoryItem) ID() string

type Reconciler

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

func NewReconciler

func NewReconciler(kubeconfig string) (*Reconciler, error)

func (*Reconciler) Apply

func (r *Reconciler) Apply(yaml string, opts ApplyOpts) (Inventory, error)

func (*Reconciler) Delete

func (r *Reconciler) Delete(yaml string, opts DeleteOpts) error

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(yaml string, opts ApplyOpts, previousInventory *Inventory) (Inventory, error)

func (*Reconciler) SetLogFunc

func (r *Reconciler) SetLogFunc(f func(string))

Jump to

Keyboard shortcuts

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