composite

package
v0.0.0-...-5063248 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// StateAnnotation is the key of the annotation used to store enough information about the comopsite's state
	// to track child resource kinds so they can be pruned even between operator versions
	StateAnnotation = "hive.wellplayed.games/composite-state"
	// ParentLabel is the key of the label used to indicate which composite resource produced a given child resource
	ParentLabel = "hive.wellplayed.games/composite-parent"
)

Variables

This section is empty.

Functions

func IsPermanentError

func IsPermanentError(err error) bool

IsPermanentError returns true if the error should not result in a retry.

Types

type Reconciler

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

Reconciler reconciles composite resources.

func New

func New(logger logr.Logger, client client.Client, scheme *runtime.Scheme, parent client.Object, owner string) (*Reconciler, error)

func (*Reconciler) AssertChildren

func (r *Reconciler) AssertChildren(ctx context.Context, children []client.Object) error

AssertChildren reconciles child resources of a composite resource without removing any existing children.

func (*Reconciler) Prune

func (r *Reconciler) Prune(ctx context.Context) error

Reconcile child resources of a composite resource.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, children []client.Object) error

Reconcile child resources of a composite resource.

type State

type State struct {
	DeployedKinds []schema.GroupVersionKind `json:"deployedKinds,omitempty"`
}

State describes the state of the

func (*State) EnsureKinds

func (s *State) EnsureKinds(kinds []schema.GroupVersionKind) bool

EnsureKinds makes sure the given kinds are included and returns true if any changes were made.

type StateAccessor

type StateAccessor interface {
	GetCompositeState() (*State, error)
	SetCompositeState(newState *State) error
}

StateAccessor is a type which can access the composite state of an object.

func AccessState

func AccessState(obj metav1.Object) StateAccessor

AccessState provides an accessor for

Jump to

Keyboard shortcuts

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