resrcpatcher

package
v0.0.0-...-b0e6734 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtraMetadataPatcher

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

func NewExtraMetadataPatcher

func NewExtraMetadataPatcher(annotations, labels map[string]string) *ExtraMetadataPatcher

func (*ExtraMetadataPatcher) Match

func (p *ExtraMetadataPatcher) Match(ctx context.Context, info *ResourceInfo) (bool, error)

func (*ExtraMetadataPatcher) Patch

func (*ExtraMetadataPatcher) Type

func (p *ExtraMetadataPatcher) Type() Type

type ReleaseMetadataPatcher

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

func NewReleaseMetadataPatcher

func NewReleaseMetadataPatcher(releaseName, releaseNamespace string) *ReleaseMetadataPatcher

func (*ReleaseMetadataPatcher) Match

func (p *ReleaseMetadataPatcher) Match(ctx context.Context, info *ResourceInfo) (bool, error)

func (*ReleaseMetadataPatcher) Patch

func (*ReleaseMetadataPatcher) Type

func (p *ReleaseMetadataPatcher) Type() Type

type ResourceInfo

type ResourceInfo struct {
	Obj          *unstructured.Unstructured
	Type         resrc.Type
	ManageableBy resrc.ManageableBy
}

type ResourcePatcher

type ResourcePatcher interface {
	Match(ctx context.Context, resourceInfo *ResourceInfo) (matched bool, err error)
	Patch(ctx context.Context, matchedResourceInfo *ResourceInfo) (output *unstructured.Unstructured, err error)
	Type() Type
}

type Type

type Type string
const TypeExtraMetadataPatcher Type = "extra-metadata-patcher"
const TypeReleaseMetadataPatcher Type = "release-metadata-patcher"

Jump to

Keyboard shortcuts

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