mutation

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutator

type Mutator interface {
	// MutateSpec transform a remote object into a local one. On the first
	// mutation, otherObj will be nil. MutateSpec can modify all fields
	// except the status (i.e. "mutate spec" here means to mutate expected state,
	// which can be more than just the spec).
	MutateSpec(toMutate *unstructured.Unstructured, otherObj *unstructured.Unstructured) (*unstructured.Unstructured, error)
	// MutateStatus transform a local object into a remote one. MutateStatus
	// must only modify the status field.
	MutateStatus(toMutate *unstructured.Unstructured, otherObj *unstructured.Unstructured) (*unstructured.Unstructured, error)
}

func NewMutator

NewMutator creates a new mutator, which will apply the mutation rules to a synced object, in both directions. A nil spec is supported and will simply make the mutator not do anything.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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