controllerruntime

package
v0.1.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: EUPL-1.2 Imports: 24 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyLabels

func ApplyLabels(parent client.Object, resource client.Object, opts *LabelOpts)

func ComputeReadyCondition

func ComputeReadyCondition(obj conditions.Setter, t ...string)

func CreateOrPatch

func CreateOrPatch(ctx context.Context, r Reconciler, obj client.Object, mutate controllerutil.MutateFn) error

func ExtractLabelSelector

func ExtractLabelSelector(resource client.Object) map[string]string

func FilterLabelSelector

func FilterLabelSelector(labels map[string]string) map[string]string

func GetLabelSelector

func GetLabelSelector(parent client.Object, opts *LabelOpts) map[string]string

func GetLabels

func GetLabels(parent client.Object, opts *LabelOpts) map[string]string

func GetResourceName

func GetResourceName(parent client.Object, suffixes ...string) string

func IsDependencyNotReady

func IsDependencyNotReady(o conditions.Getter) bool

func IsImporting

func IsImporting(o conditions.Getter) bool

func ObserveGenerationChange

func ObserveGenerationChange(ctx context.Context, r Reconciler, patcher *patch.SerialPatcher, o conditions.Setter) error

func Patch

func Patch(ctx context.Context, r Reconciler, patcher *patch.SerialPatcher, obj conditions.Setter, opts PatchOpts) error

func SetDependencyCondition

func SetDependencyCondition(to conditions.Setter, dependencies ...Dependency)

func SetResourceNamespacedName

func SetResourceNamespacedName(parent client.Object, resource client.Object, suffixes ...string)

Types

type Dependency

type Dependency interface {
	// client.Object
	conditions.Setter
}

type LabelOpts

type LabelOpts struct {
	Component string
	Version   string
}

type Object

type Object interface {
	conditions.Setter
	GetSuspend() bool
	SetSuspend(bool)
	GetVersion() string
	SetVersion(string)
}

type PatchOpts

type PatchOpts struct {
	DisableReadyCondition           bool
	ReadyNegativePolarityConditions []string
}

type Reconciler

type Reconciler interface {
	client.Client
	Name() string
	OwnedConditions() []string
}

type Result

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

func Initialize

func Initialize(ctx context.Context, r Reconciler, req ctrl.Request, o Object) (*patch.SerialPatcher, *Result)

func InstallJob

func InstallJob(ctx context.Context, r Reconciler, patcher *patch.SerialPatcher, o Object, job *batchv1.Job, version string, f controllerutil.MutateFn) *Result

func WrapResult

func WrapResult(result ctrl.Result, err error) *Result

func (*Result) Unwrap

func (r *Result) Unwrap() (ctrl.Result, error)

Jump to

Keyboard shortcuts

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