patch

package
v2.0.0-...-6831f71 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IgnoreStatusFields                         = patch.IgnoreStatusFields
	IgnoreVolumeClaimTemplateTypeMetaAndStatus = patch.IgnoreVolumeClaimTemplateTypeMetaAndStatus
)
View Source
var RHMDefaultPatcher = NewPatcher(
	"marketplace.redhat.com/last-applied",
	patch.IgnoreStatusFields(),
	IgnoreMetadata(),
)

Functions

func IgnoreMetadata

func IgnoreMetadata() patch.CalculateOption

Types

type PatchAnnotator

type PatchAnnotator interface {
	GetOriginalConfiguration(obj runtime.Object) ([]byte, error)
	SetOriginalConfiguration(obj runtime.Object, original []byte) error
	GetModifiedConfiguration(obj runtime.Object, annotate bool) ([]byte, error)
	SetLastAppliedAnnotation(obj runtime.Object) error
}

PatchAnnotator is the interface for creating new patch annotations using the patch library

type PatchMaker

type PatchMaker interface {
	Calculate(
		currentObject,
		modifiedObject runtime.Object,
		opts ...patch.CalculateOption) (*patch.PatchResult, error)
}

PatchMaker is the interface for creating new patches using the patch library

type Patcher

type Patcher struct {
	PatchAnnotator
	PatchMaker
	PatchOptions []patch.CalculateOption
}

func NewPatcher

func NewPatcher(
	annotation string,
	options ...patch.CalculateOption,
) Patcher

func (Patcher) Calculate

func (p Patcher) Calculate(
	currentObject,
	modifiedObject runtime.Object,
) (*patch.PatchResult, error)

Jump to

Keyboard shortcuts

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