Documentation ¶
Index ¶
Constants ¶
const ( PreApply = "pre-apply" PostApply = "post-apply" PreDelete = "pre-delete" PostDelete = "post-delete" )
Supported types of hooks.
Variables ¶
var SupportedTypes = []string{PreApply, PostApply, PreDelete, PostDelete}
SupportedTypes contains a list of supported hook types.
Functions ¶
func IsSupportedType ¶
IsSupportedType returns true if typ is a supported hook type.
func LabelSelector ¶
LabelSelector returns a selector which can be used to find hooks of given type for given chart in a cluster.
Types ¶
type Hook ¶
type Hook struct {
*unstructured.Unstructured
}
Hook gets executed before or after apply/delete depending on its type. It wraps an unstructured object to enhance it with some extra logic for validation and working with hook options.
func (*Hook) AllowFailure ¶
AllowFailure indicates whether the hook is allowed to fail or not. If true, hook errors are only printed and execution continues. If this is true, NoWait() must not return true as well.
type List ¶
type List []*Hook
List is a slice of *Hook.
func (List) EachItem ¶
EachItem walks the list and calls fn for each item. If fn returns an error for any hook, walking the list is stopped and the error is returned.
func (List) ToObjectList ¶
ToObjectList converts l to a slice of runtime.Object.
type Map ¶
Map is a map of hook type to lists of hooks.
type UnsupportedKindError ¶
type UnsupportedKindError struct {
Kind string
}
UnsupportedKindError denotes that the hook object has a resource kind that is not supported to be used as a hook.
func (UnsupportedKindError) Error ¶
func (e UnsupportedKindError) Error() string
Error implements the error interface.
type UnsupportedTypeError ¶
type UnsupportedTypeError struct {
Type string
}
UnsupportedTypeError denotes that a hook has a type that is not supported.
func (UnsupportedTypeError) Error ¶
func (e UnsupportedTypeError) Error() string
Error implements the error interface.