manifest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelRelease           = "release.octohelm.tech"
	AnnotationReleaseStage = "release.octohelm.tech/stage"
)

Variables

View Source
var (
	InstallOrder   = releaseutil.InstallOrder
	UninstallOrder = releaseutil.UninstallOrder
)

Functions

func Annotated

func Annotated(o Object, annotations map[string]string)

func Extract

func Extract(m interface{}) (map[string]Object, error)

func Identity

func Identity(o Object) string

func IgnoreNamespace

func IgnoreNamespace() func(m Object) Object

func KindName

func KindName(m Object) string

Types

type ErrBadExpr

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

ErrBadExpr occurs when the regexp compiling fails

func (ErrBadExpr) Error

func (e ErrBadExpr) Error() string

type Ignorer

type Ignorer interface {
	IgnoreString(string) bool
}

Ignorer is like matcher, but for explicitely ignoring resources

type KindSortOrder

type KindSortOrder = releaseutil.KindSortOrder

type List

type List []Object

func Filter

func Filter(list List, exprs Matchers) List

func Process

func Process(cfg releasev1alpha1.Release, exprs Matchers) (List, error)

func ProcessManifests

func ProcessManifests(list List, fns ...ProcessFunc) (processed List)

func ProcessResources

func ProcessResources(r *releasev1alpha1.Release, exprs Matchers) (List, error)

func (List) DeepCopy

func (l List) DeepCopy() List

func (List) Orphaned

func (l List) Orphaned(expectedList List) List

type Matcher

type Matcher interface {
	MatchString(string) bool
}

type Matchers

type Matchers []Matcher

Matchers is a collection of multiple expressions. A matcher may also implement Ignorer to explicitely ignore fields

func MustStrExps

func MustStrExps(strs ...string) Matchers

func RegExps

func RegExps(rs []*regexp.Regexp) Matchers

RegExps is a helper to construct Matchers from regular expressions

func StrExps

func StrExps(strs ...string) (Matchers, error)

func (Matchers) IgnoreString

func (e Matchers) IgnoreString(s string) bool

func (Matchers) MatchString

func (e Matchers) MatchString(s string) bool

MatchString returns whether at least one expression (OR) matches the string

type NegMatcher

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

func (NegMatcher) IgnoreString

func (n NegMatcher) IgnoreString(s string) bool

func (NegMatcher) MatchString

func (n NegMatcher) MatchString(s string) bool

type Object

type Object = client.Object

func DeepCopy

func DeepCopy(m Object) (Object, error)

func NewForGroupVersionKind

func NewForGroupVersionKind(gvk schema.GroupVersionKind) (Object, error)

func ObjectFromRuntimeObject

func ObjectFromRuntimeObject(ro runtime.Object) (Object, error)

func SortByKind

func SortByKind(manifests []Object, ordering KindSortOrder) []Object

type ObjectList

type ObjectList = client.ObjectList

func NewListForGroupVersionKind

func NewListForGroupVersionKind(gvk schema.GroupVersionKind) (ObjectList, error)

func ObjectListFromRuntimeObject

func ObjectListFromRuntimeObject(ro runtime.Object) (ObjectList, error)

type ProcessFunc

type ProcessFunc = func(m Object) Object

func WithNamespace

func WithNamespace(def string) ProcessFunc

func WithReleaseName

func WithReleaseName(v string) ProcessFunc

Jump to

Keyboard shortcuts

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