Documentation ¶
Index ¶
- Constants
- Variables
- func AddValidOwnerChange(oldSubcontext, newSubContext string)
- func Ensure(ctx context.Context, client kclient.Client, obj ...kclient.Object) error
- func GetLabelsAndAnnotations(scheme *runtime.Scheme, ownerSubContext string, owner kclient.Object) (map[string]string, map[string]string, error)
- func GetSelector(labelSet map[string]string) (labels.Selector, error)
- type Apply
Constants ¶
View Source
const ( LabelPrefix = "apply.acorn.io/" LabelSubContext = LabelPrefix + "owner-sub-context" LabelGVK = LabelPrefix + "owner-gvk" LabelName = LabelPrefix + "owner-name" LabelNamespace = LabelPrefix + "owner-namespace" LabelHash = LabelPrefix + "hash" AnnotationPrune = LabelPrefix + "prune" AnnotationCreate = LabelPrefix + "create" AnnotationUpdate = LabelPrefix + "update" )
View Source
const (
LabelApplied = "apply.acorn.io/applied"
)
Variables ¶
View Source
var (
ErrOwnerNotFound = errors.New("owner not found")
)
View Source
var (
ErrReplace = errors.New("replace object with changes")
)
View Source
var (
LogInfo func(format string, args ...interface{})
)
Functions ¶
func AddValidOwnerChange ¶
func AddValidOwnerChange(oldSubcontext, newSubContext string)
func GetLabelsAndAnnotations ¶
Types ¶
type Apply ¶
type Apply interface { Ensure(ctx context.Context, obj ...kclient.Object) error Apply(ctx context.Context, owner kclient.Object, objs ...kclient.Object) error WithOwnerSubContext(ownerSubContext string) Apply WithNamespace(ns string) Apply WithPruneGVKs(gvks ...schema.GroupVersionKind) Apply WithPruneTypes(gvks ...kclient.Object) Apply WithNoPrune() Apply FindOwner(ctx context.Context, obj kclient.Object) (kclient.Object, error) PurgeOrphan(ctx context.Context, obj kclient.Object) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.