clienthelper

package
v0.0.0-...-f558795 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(old, new client.Object) (client.Object, bool, string, error)

merge takes the existing (old) and desired (new) objects. It compares them to see if an update is necessary, fixes up the new object if needed, and returns the difference for debugging purposes.

Types

type Interface

type Interface interface {
	Reader
	Writer
}

func NewWithClient

func NewWithClient(log *logrus.Entry, client client.Client) Interface

type Reader

type Reader interface {
	client.Reader
	GetOne(ctx context.Context, key types.NamespacedName, obj kruntime.Object) error
}

type Writer

type Writer interface {
	client.Writer
	// Ensure applies self-contained objects to a Kubernetes API, merging
	// client-side if required.
	Ensure(ctx context.Context, objs ...kruntime.Object) error
	EnsureDeleted(ctx context.Context, gvk schema.GroupVersionKind, key types.NamespacedName) error
}

Jump to

Keyboard shortcuts

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