reconciler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 14 Imported by: 36

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DesiredState

type DesiredState interface {
	BeforeUpdate(object runtime.Object) error
}

type DesiredStateHook

type DesiredStateHook func(object runtime.Object) error

func (DesiredStateHook) BeforeUpdate

func (d DesiredStateHook) BeforeUpdate(object runtime.Object) error

type GenericResourceReconciler

type GenericResourceReconciler struct {
	Log     logr.Logger
	Client  runtimeClient.Client
	Options ReconcilerOpts
}

GenericResourceReconciler generic resource reconciler

func NewReconciler

func NewReconciler(client runtimeClient.Client, log logr.Logger, opts ReconcilerOpts) *GenericResourceReconciler

NewReconciler returns GenericResourceReconciler

func (*GenericResourceReconciler) CreateResource

func (r *GenericResourceReconciler) CreateResource(desired runtime.Object) error

CreateResource creates a resource if it doesn't exist

func (*GenericResourceReconciler) ReconcileResource

func (r *GenericResourceReconciler) ReconcileResource(desired runtime.Object, desiredState DesiredState) (*reconcile.Result, error)

ReconcileResource reconciles various kubernetes types

type ReconcilerOpts

type ReconcilerOpts struct {
	EnableRecreateWorkloadOnImmutableFieldChange     bool
	EnableRecreateWorkloadOnImmutableFieldChangeHelp string
}

type StaticDesiredState

type StaticDesiredState string
const (
	StateAbsent  StaticDesiredState = "Absent"
	StatePresent StaticDesiredState = "Present"
)

func (StaticDesiredState) BeforeUpdate

func (s StaticDesiredState) BeforeUpdate(object runtime.Object) error

Jump to

Keyboard shortcuts

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