patch

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

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

Helper is a utility for ensuring the proper patching of objects and their status. Inspired from: https://github.com/kubernetes-sigs/cluster-api/blob/v1.3.3/util/patch/patch.go But with simplified logic.

func NewHelper

func NewHelper(obj client.Object, crClient client.Client) (*Helper, error)

NewHelper returns a new patch helper.

func (*Helper) Patch

func (h *Helper) Patch(ctx context.Context, afterObject client.Object) error

Patch will attempt to patch the provided resource and its status.

Jump to

Keyboard shortcuts

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