controller

package
v0.11.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRetry = wait.Backoff{
	Steps:    5,
	Duration: 5 * time.Second,
	Factor:   1.0,
	Jitter:   0.1,
}

Functions

This section is empty.

Types

type BundleDeploymentReconciler

type BundleDeploymentReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	// LocalClient is the client for the cluster the agent is running on.
	LocalClient client.Client

	Deployer    *deployer.Deployer
	Monitor     *monitor.Monitor
	DriftDetect *driftdetect.DriftDetect
	Cleanup     *cleanup.Cleanup

	DefaultNamespace string

	// AgentInfo is the labelSuffix used by the helm deployer
	AgentScope string
}

BundleDeploymentReconciler reconciles a BundleDeployment object, by deploying the bundle as a helm release.

func (*BundleDeploymentReconciler) Reconcile

Reconcile compares the state specified by the BundleDeployment object against the actual state, and decides if the bundle should be deployed. The deployed resources are then monitored for drift. It also updates the status of the BundleDeployment object with the results.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.0/pkg/reconcile

func (*BundleDeploymentReconciler) SetupWithManager

func (r *BundleDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type DriftReconciler added in v0.11.0

type DriftReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	Deployer    *deployer.Deployer
	Monitor     *monitor.Monitor
	DriftDetect *driftdetect.DriftDetect

	DriftChan chan event.GenericEvent
}

func (*DriftReconciler) Reconcile added in v0.11.0

func (r *DriftReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is triggered via a channel from the driftdetect mini controller, which watches deployed resources for drift. It does so by creating a plan and comparing it to the current state. It will update the status of the BundleDeployment and correct drift if enabled.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.0/pkg/reconcile

func (*DriftReconciler) SetupWithManager added in v0.11.0

func (r *DriftReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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