deleteinstrumentationconfig

package
v1.0.155 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteInstrumentationSourcePredicate = predicate.Funcs{
	UpdateFunc: func(e event.UpdateEvent) bool {
		source := e.ObjectNew.(*v1alpha1.Source)
		return !sourceutils.IsSourceRelevant(source)
	},

	CreateFunc: func(e event.CreateEvent) bool {
		source := e.Object.(*v1alpha1.Source)
		return !sourceutils.IsSourceRelevant(source)
	},

	DeleteFunc: func(e event.DeleteEvent) bool {
		return false
	},

	GenericFunc: func(e event.GenericEvent) bool {
		source := e.Object.(*v1alpha1.Source)
		return !sourceutils.IsSourceRelevant(source)
	},
}

DeleteInstrumentationSourcePredicate returns true if the Source object is relevant to deleting instrumentation. This means that the Source must be either: 1) A normal (non-excluding) Source AND terminating, or 2) An excluding Source AND NOT terminating In either of these cases, we want to check if workloads should start to be instrumented.

Functions

func SetupWithManager

func SetupWithManager(mgr ctrl.Manager) error

The startlangdetection controller handles uninstrumenting workloads. It provides a Source controller, which handles most events where uninstrumentation will occur: either by creating a new disabled Source object, or deleting an old Source object that enabled instrumentation. However, we also have controllers to monitor workload objects and namespaces. Because Sources are decoupled from these resources, a Source event might not immediately trigger uninstrumentation (for example, if a Deployment is deleted before a Source, then the Deployment event will trigger instrumentation). This design ensures 2-way reconciliation between Source CRD and workloads. Uninstrumentation itself is handled by the InstrumentationConfig controller, and these objects represent whether a workload is actively instrumented in the backend.

Types

type DaemonSetReconciler

type DaemonSetReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*DaemonSetReconciler) Reconcile

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

type DeploymentReconciler

type DeploymentReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*DeploymentReconciler) Reconcile

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

type InstrumentationConfigReconciler

type InstrumentationConfigReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*InstrumentationConfigReconciler) Reconcile

type InstrumentedApplicationMigrationReconciler

type InstrumentedApplicationMigrationReconciler struct {
	client.Client
}

InstrumentationConfigReconciler is used as a migration, to delete InstrumentedApplication objects This is added in January 2025, once enough time will pass, we can remove this and remove the instrumentedApplication CRD as well.

func (*InstrumentedApplicationMigrationReconciler) Reconcile

type NamespaceReconciler

type NamespaceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*NamespaceReconciler) Reconcile

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

type SourceReconciler

type SourceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*SourceReconciler) Reconcile

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

type StatefulSetReconciler

type StatefulSetReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*StatefulSetReconciler) Reconcile

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

Jump to

Keyboard shortcuts

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