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 ¶
func NewMutator(spec *syncagentv1alpha1.ResourceMutationSpec) (Mutator, error)
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.
Click to show internal directories.
Click to hide internal directories.