patch

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NullHolder    = "NULL_HOLDER"
	NullHolderStr = "\"NULL_HOLDER\""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Patch

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

func NewMergePatch

func NewMergePatch() *Patch

NewMergePatch returns a merge-patch type patch entity, which applies to CRDs like tfjobs, pytorchjobs...

func NewStrategicPatch

func NewStrategicPatch() *Patch

NewStrategicPatch returns a strategic-merge-patch type patch entity, which applies to build-in resource like pods, services...

func (*Patch) AddFinalizer

func (p *Patch) AddFinalizer(item string) *Patch

func (*Patch) Data

func (p *Patch) Data(obj client.Object) ([]byte, error)

Data implements Patch interface.

func (*Patch) DeleteAnnotation

func (p *Patch) DeleteAnnotation(key string) *Patch

func (*Patch) DeleteLabel

func (p *Patch) DeleteLabel(key string) *Patch

func (*Patch) InsertAnnotation

func (p *Patch) InsertAnnotation(key, value string) *Patch

func (*Patch) InsertLabel

func (p *Patch) InsertLabel(key, value string) *Patch

func (*Patch) OverrideFinalizer

func (p *Patch) OverrideFinalizer(items []string) *Patch

func (*Patch) RemoveFinalizer

func (p *Patch) RemoveFinalizer(item string) *Patch

func (*Patch) String

func (p *Patch) String() string

func (*Patch) Type

func (p *Patch) Type() types.PatchType

Type implements Patch interface.

Jump to

Keyboard shortcuts

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