mutator

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

mutator package provide an interface for mutating resources. It also contains some premade generator that can be used as is.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	CanHandleResource(*metav1.PartialObjectMetadata) bool
	// Mutate receive a resource that can be mutated or an error if something goes wrong
	Mutate(*unstructured.Unstructured, cache.RemoteResourceGetter) error
}

Interface defines the interface for a mutator that can change the resource

func NewLabelsMutator

func NewLabelsMutator(labels map[string]string) Interface

NewLabelsMutator return a new mutateor.Interface that will integrate the objects labels with the ones provided during initialization

Jump to

Keyboard shortcuts

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