config

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package config provides global configuration for the basereconciler. The package provides some barebones configuration, but in most cases the user will want to tailor this configuration to the needs and requirements of the specific controller/s.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreDynamicWatchesEnabled added in v0.5.0

func AreDynamicWatchesEnabled() bool

AreDynamicWatchesEnabled returs a boolean indicating wheter the dynamic watches are enabled or not.

func DisableDynamicWatches added in v0.5.0

func DisableDynamicWatches()

DisableDynamicWatches disables controller dynamic watches. Dynamic watches keep track of the resource types that the controller owns and dynamically adds watches to the controller for those.

func DisableResourcePruner

func DisableResourcePruner()

DisableResourcePruner disables the resource pruner. The resource pruner keeps track of the owned resources of a given custom resource and deletes all that are not present in the list of managed resoures to reconcile.

func EnableDynamicWatches added in v0.5.0

func EnableDynamicWatches()

EnableDynamicWatches enables controller dynamic watches. Dynamic watches keep track of the resource types that the controller owns and dynamically adds watches to the controller for those.

func EnableResourcePruner

func EnableResourcePruner()

EnableResourcePruner enables the resource pruner. The resource pruner keeps track of the owned resources of a given custom resource and deletes all that are not present in the list of managed resoures to reconcile.

func GetAnnotationsDomain

func GetAnnotationsDomain() string

GetAnnotationsDomain returns the globally configured annotations domain. The annotations domain is used for the rollout trigger annotations (see the mutators package) and the resource finalizers

func IsResourcePrunerEnabled

func IsResourcePrunerEnabled() bool

IsResourcePrunerEnabled returs a boolean indicating wheter the resource pruner is enabled or not.

func SetAnnotationsDomain

func SetAnnotationsDomain(domain string)

SetAnnotationsDomain globally configures the annotations domain. The annotations domain is used for the rollout trigger annotations (see the mutators package) and the resource finalizers

func SetDefaultReconcileConfigForGVK

func SetDefaultReconcileConfigForGVK(gvk schema.GroupVersionKind, cfg ReconcileConfigForGVK)

SetDefaultReconcileConfigForGVK sets the default configuration that instructs basereconciler how to reconcile a given kubernetes GVK (GroupVersionKind). This default config will be used if the "resource.Template" object (see the resource package) does not specify a configuration itself. If the passed GVK is an empty one ("schema.GroupVersionKind{}"), the function will set the wildcard instead, which is a default set of basic reconclie rules that the reconciler will try to use when no other configuration is available.

Types

type ReconcileConfigForGVK

type ReconcileConfigForGVK struct {
	EnsureProperties []string
	IgnoreProperties []string
}

func GetDefaultReconcileConfigForGVK

func GetDefaultReconcileConfigForGVK(gvk schema.GroupVersionKind) (ReconcileConfigForGVK, error)

GetDefaultReconcileConfigForGVK returns the default configuration that instructs basereconciler how to reconcile a given kubernetes GVK (GroupVersionKind). This default config will be used if the "resource.Template" object (see the resource package) does not specify a configuration itself. When the passed GVK does not match any of the configured, this function returns the "wildcard", which is a default set of basic reconclie rules that the reconciler will try to use when no other configuration is available.

Jump to

Keyboard shortcuts

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