serverside

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReconcileObject

func ReconcileObject(ctx context.Context, c client.Client, obj client.Object) error

func ReconcileObjects

func ReconcileObjects(ctx context.Context, c client.Client, objs []client.Object) error

func ReconcileYaml

func ReconcileYaml(ctx context.Context, c client.Client, yaml []byte) error

func UpdateObject added in v0.17.0

func UpdateObject(ctx context.Context, c client.Client, obj client.Object) error

UpdateObject updates the existing object during reconciliation. This is intended for special use cases only as the preferred method to reconcile objects is server-side apply.

Types

type ObjectApplier added in v0.12.0

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

ObjectApplier helps reconcile kubernetes object using server side apply.

func NewObjectApplier added in v0.12.0

func NewObjectApplier(client client.Client) *ObjectApplier

NewObjectApplier builds a ObjectApplier.

func (*ObjectApplier) Apply added in v0.12.0

func (a *ObjectApplier) Apply(ctx context.Context, generateObjects ObjectGenerator) (controller.Result, error)

Apply uses server side apply to reconcile kubernetes objects returned by a generator Useful in reconcilers because it simplifies the reconciliation when generating API objects from another package, like a provider This is mostly a helper for generate objects + serverside apply.

type ObjectGenerator added in v0.12.0

type ObjectGenerator func() ([]kubernetes.Object, error)

Jump to

Keyboard shortcuts

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