integrationcap

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package integrationcap selects Integrations by the capability they provide. More than one controller reads Integration configuration: the integration-controller's receiver routes deliveries by capability, and the context-controller reads the enhancers' settings. Keeping selection here stops the rule (exactly one enabled Integration per capability per namespace, the v1alpha1 singleton rule) from forking between them.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoIntegration: no enabled Integration provides the capability.
	ErrNoIntegration = errors.New("no integration provides the capability")
	// ErrAmbiguousIntegration: several Integrations provide the capability,
	// but v1alpha1 requires exactly one per namespace.
	ErrAmbiguousIntegration = errors.New("multiple integrations provide the capability")
)

Sentinel errors for integration selection.

Functions

func AWSResourceTagsEnabled

func AWSResourceTagsEnabled(i *v1alpha1.Integration) bool

AWSResourceTagsEnabled reports whether the Integration enables the AWS resource-tags enhancer. It lives here for the same reason as CloudAssetInventoryEnabled: its consumer is the context-controller.

func AzureResourceTagsEnabled

func AzureResourceTagsEnabled(i *v1alpha1.Integration) bool

AzureResourceTagsEnabled reports whether the Integration enables the Azure resource-tags enhancer. It lives here for the same reason as CloudAssetInventoryEnabled: its consumer is the context-controller.

func BackfillSupported added in v0.15.0

func BackfillSupported(i *v1alpha1.Integration) bool

BackfillSupported reports whether a backfill request could do anything on the Integration: the github provider with code-scanning or secret-scanning ingestion enabled, the same gate the integration-controller's lister applies. It ignores spec.suspend, so callers that act on the answer check that separately. The status server's configuration view and repositories page, and the integration-controller's repository-access check, all decide with it.

func CloudAssetInventoryEnabled

func CloudAssetInventoryEnabled(i *v1alpha1.Integration) bool

CloudAssetInventoryEnabled reports whether the Integration enables the Cloud Asset Inventory enhancer. It lives here rather than beside the receiver's ingestion predicates because its consumer is the context-controller, which must not import the integration-controller.

func GenericEnhanceEnabled added in v0.9.1

func GenericEnhanceEnabled(i *v1alpha1.Integration) bool

GenericEnhanceEnabled reports whether the Integration enables the external generic enhancer. It lives here for the same reason as CloudAssetInventoryEnabled: its consumer is the context-controller. Unlike every other capability, generic is exempt from the Select singleton rule: any number of generic integrations enhance side by side, so consumers List with this predicate rather than Select with it.

func Select

func Select(
	ctx context.Context, r client.Reader, namespace string, has Capability,
) (*v1alpha1.Integration, error)

Select returns the single Integration in namespace providing the capability (the v1alpha1 singleton rule).

Types

type Capability

type Capability func(*v1alpha1.Integration) bool

Capability selects Integrations by what they provide.

Jump to

Keyboard shortcuts

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