Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCleaner ¶
func NewCleaner(manager ctrl.Manager, name controllername.ControllerNamer, gvrRetriever CleanTypeRetriever) error
NewCleaner creates a cleaner that attempts to delete resources with the labels specified and of the types returned by CleanTypeRetriever
func NewResourceReconciler ¶
func NewResourceReconciler(manager ctrl.Manager, name controllername.ControllerNamer, resources []client.Object, reconcileInterval time.Duration) error
NewResourceReconciler creates a reconciler that continuously ensures that the provided resources are provisioned
Types ¶
type CleanTypeRetriever ¶
type CleanTypeRetriever func(mapper meta.RESTMapper) ([]cleanType, error)
CleanTypeRetriever returns types and labels for the cleaner to remove
func RetrieverEmpty ¶
func RetrieverEmpty() CleanTypeRetriever
RetrieverEmpty is commonly used to start a chain of retriever functions
func RetrieverFromGk ¶
func RetrieverFromGk(labels map[string]string, gks ...schema.GroupKind) CleanTypeRetriever
RetrieverFromGk retrieves a list of group version resources based on group kinds
func RetrieverFromObjs ¶
func RetrieverFromObjs(objs []client.Object, labels map[string]string) CleanTypeRetriever
RetrieverFromObjs retrieves a list of group version resources based on supplied object types
func (CleanTypeRetriever) Add ¶
func (g CleanTypeRetriever) Add(retriever CleanTypeRetriever) CleanTypeRetriever
Add merges the results of two retrievers
func (CleanTypeRetriever) Remove ¶
func (g CleanTypeRetriever) Remove(retriever CleanTypeRetriever, opt RemoveOpt) CleanTypeRetriever
Remove removes results from the receiver that are present in the supplied retriever
type CompareStrategy ¶
type CompareStrategy int
CompareStrategy determines the comparison strategy between cleanTypes
const ( Everything CompareStrategy = iota // compare Everything IgnoreLabels // ignore labels when comparing )
type RemoveOpt ¶
type RemoveOpt struct {
CompareStrat CompareStrategy
}
RemoveOpt is used to configure the removal