controllerutils

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FinalizeAstarte

func FinalizeAstarte(c client.Client, name, namespace string, reqLogger logr.Logger) error

FinalizeAstarte handles the finalization logic for Astarte

Types

type ReconcileHelper

type ReconcileHelper struct {
	// This client, initialized using mgr.Client() above, is a split client
	// that reads objects from the cache and writes to the apiserver
	Client   client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

ReconcileHelper contains all needed objects to carry over reconciliation of an Astarte-like resource

func (*ReconcileHelper) CheckAndPerformUpgrade

func (r *ReconcileHelper) CheckAndPerformUpgrade(reqLogger logr.Logger, instance *apiv1alpha1.Astarte, newAstarteSemVersion *semver.Version) (ctrl.Result, error)

CheckAndPerformUpgrade carries over an upgrade, if needed, of an Astarte resource

func (*ReconcileHelper) ComputeAstarteStatusResource

func (r *ReconcileHelper) ComputeAstarteStatusResource(reqLogger logr.Logger, instance *apiv1alpha1.Astarte) commontypes.AstarteStatus

ComputeAstarteStatusResource computes an AstarteStatus resource

func (*ReconcileHelper) ComputeClusterHealth

func (r *ReconcileHelper) ComputeClusterHealth(reqLogger logr.Logger, instance *apiv1alpha1.Astarte) commontypes.AstarteClusterHealth

ComputeClusterHealth computes, given an Astarte instance, the Health of the cluster

func (*ReconcileHelper) EnsureAstarteMicroservices

func (r *ReconcileHelper) EnsureAstarteMicroservices(instance *apiv1alpha1.Astarte) error

EnsureAstarteMicroservices reconciles all Astarte microservices

func (*ReconcileHelper) EnsureStatusCoherency

func (r *ReconcileHelper) EnsureStatusCoherency(reqLogger logr.Logger, instance *apiv1alpha1.Astarte, request ctrl.Request) (ctrl.Result, error)

EnsureStatusCoherency ensures status coherency

func (*ReconcileHelper) ReconcileAstarteResources

func (r *ReconcileHelper) ReconcileAstarteResources(instance *apiv1alpha1.Astarte) error

ReconcileAstarteResources reconciles all third-party dependencies, when needed

Jump to

Keyboard shortcuts

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