Documentation ¶
Index ¶
- Constants
- func AdvancedTemplateFuncMap(config *rest.Config, logger logr.Logger) template.FuncMap
- func GetDynamicClientForAPIResource(context context.Context, resource *metav1.APIResource) (dynamic.NamespaceableResourceInterface, error)
- func GetDynamicClientForGVK(context context.Context, gvk schema.GroupVersionKind) (dynamic.NamespaceableResourceInterface, bool, error)
- func GetDynamicClientOnUnstructured(context context.Context, obj *unstructured.Unstructured) (dynamic.ResourceInterface, error)
- func IsOwner(owner, owned metav1.Object) bool
- func ManageOutcome(context context.Context, r ReconcilerBase, obj client.Object, issue error) (reconcile.Result, error)
- func ManageOutcomeWithRequeue(context context.Context, r ReconcilerBase, obj client.Object, issue error, ...) (reconcile.Result, error)
- func NewLookupFunction(config *rest.Config, logger logr.Logger) lookupFunc
- func SetIndexField(context context.Context, cache cache.Cache, obj client.Object, path string) error
- type ReconcilerBase
- func (r *ReconcilerBase) CreateOrUpdateResource(context context.Context, owner client.Object, namespace string, ...) error
- func (r *ReconcilerBase) DeleteResourceIfExists(context context.Context, obj client.Object) error
- func (r *ReconcilerBase) GetClient() client.Client
- func (r *ReconcilerBase) GetDiscoveryClient() (*discovery.DiscoveryClient, error)
- func (r *ReconcilerBase) GetRecorder() record.EventRecorder
- func (r *ReconcilerBase) GetRestConfig() *rest.Config
- func (r *ReconcilerBase) GetScheme() *runtime.Scheme
- type ResourceGenerationChangedPredicate
- type VaultEngineResource
- type VaultPKIEngineResource
- type VaultResource
Constants ¶
const ReconcileFailed = "ReconcileFailed"
const ReconcileFailedReason = "LastReconcileCycleFailed"
const ReconcileSuccessful = "ReconcileSuccessful"
const ReconcileSuccessfulReason = "LastReconcileCycleSucceded"
Variables ¶
This section is empty.
Functions ¶
func AdvancedTemplateFuncMap ¶ added in v0.8.20
AdvancedTemplateFuncMap to add Sprig and additional templating functions
func GetDynamicClientForAPIResource ¶ added in v0.8.20
func GetDynamicClientForAPIResource(context context.Context, resource *metav1.APIResource) (dynamic.NamespaceableResourceInterface, error)
GetDynamicClientOnAPIResource returns a dynamic client on an APIResource. This client can be further namespaced. needs context with log and restConfig
func GetDynamicClientForGVK ¶ added in v0.8.20
func GetDynamicClientForGVK(context context.Context, gvk schema.GroupVersionKind) (dynamic.NamespaceableResourceInterface, bool, error)
GetDynamicClientForGVK returns a dynamic client on an gvk type. Also returns whether this reosurce is namespaced. This client can be further namespaced. needs context with log and restConfig
func GetDynamicClientOnUnstructured ¶ added in v0.8.20
func GetDynamicClientOnUnstructured(context context.Context, obj *unstructured.Unstructured) (dynamic.ResourceInterface, error)
GetDynamicClientOnUnstructured returns a dynamic client on an Unstructured type. This client can be further namespaced. needs context with log and restConfig TODO consider refactoring using apimachinery.RESTClientForGVK in controller-runtime
func ManageOutcome ¶ added in v0.8.9
func ManageOutcomeWithRequeue ¶ added in v0.8.9
func NewLookupFunction ¶ added in v0.8.20
NewLookupFunction get information at runtime from cluster
func SetIndexField ¶ added in v0.8.20
func SetIndexField(context context.Context, cache cache.Cache, obj client.Object, path string) error
SetIndexField this function allows to prepare an index field for an objct so that fieldSelector can be used. It needs a cache object probably obtained via mrg.GetCache() This is a generic implementation, so it's relatively slow path should be expressed in the form of .<field>.<field> ... needs context with log
Types ¶
type ReconcilerBase ¶ added in v0.8.20
type ReconcilerBase struct { Log logr.Logger ControllerName string // contains filtered or unexported fields }
func NewFromManager ¶ added in v0.8.20
func NewFromManager(mgr manager.Manager, controllerName string) ReconcilerBase
NewReconcilerBase is a contruction function to create a new ReconcilerBase.
func NewReconcilerBase ¶ added in v0.8.20
func (*ReconcilerBase) CreateOrUpdateResource ¶ added in v0.8.20
func (r *ReconcilerBase) CreateOrUpdateResource(context context.Context, owner client.Object, namespace string, obj client.Object) error
CreateOrUpdateResource creates a resource if it doesn't exist, and updates (overwrites it), if it exist if owner is not nil, the owner field os set if namespace is not "", the namespace field of the object is overwritten with the passed value
func (*ReconcilerBase) DeleteResourceIfExists ¶ added in v0.8.20
DeleteResourceIfExists deletes an existing resource. It doesn't fail if the resource does not exist
func (*ReconcilerBase) GetClient ¶ added in v0.8.20
func (r *ReconcilerBase) GetClient() client.Client
GetClient returns the underlying client
func (*ReconcilerBase) GetDiscoveryClient ¶ added in v0.8.20
func (r *ReconcilerBase) GetDiscoveryClient() (*discovery.DiscoveryClient, error)
GetDiscoveryClient returns a discovery client for the current reconciler
func (*ReconcilerBase) GetRecorder ¶ added in v0.8.20
func (r *ReconcilerBase) GetRecorder() record.EventRecorder
GetRecorder returns the underlying recorder
func (*ReconcilerBase) GetRestConfig ¶ added in v0.8.20
func (r *ReconcilerBase) GetRestConfig() *rest.Config
GetRestConfig returns the undelying rest config
func (*ReconcilerBase) GetScheme ¶ added in v0.8.20
func (r *ReconcilerBase) GetScheme() *runtime.Scheme
GetScheme returns the scheme
type ResourceGenerationChangedPredicate ¶ added in v0.8.19
ResourceGenerationChangedPredicate this predicate will fire an update event when the spec of a resource is changed (controller by ResourceGeneration), or when the finalizers are changed
func (ResourceGenerationChangedPredicate) Update ¶ added in v0.8.19
func (ResourceGenerationChangedPredicate) Update(e event.UpdateEvent) bool
Update implements default UpdateEvent filter for validating resource version change
type VaultEngineResource ¶
type VaultEngineResource struct {
// contains filtered or unexported fields
}
func NewVaultEngineResource ¶
func NewVaultEngineResource(reconcilerBase *ReconcilerBase, obj client.Object) *VaultEngineResource
type VaultPKIEngineResource ¶ added in v0.3.0
type VaultPKIEngineResource struct {
// contains filtered or unexported fields
}
func NewVaultPKIEngineResource ¶ added in v0.3.0
func NewVaultPKIEngineResource(reconcilerBase *ReconcilerBase, obj client.Object) *VaultPKIEngineResource
type VaultResource ¶
type VaultResource struct {
// contains filtered or unexported fields
}
func NewVaultResource ¶
func NewVaultResource(reconcilerBase *ReconcilerBase, obj client.Object) *VaultResource