Documentation
¶
Index ¶
- Variables
- func GetBridgeNamesFromBridges(bridges []v1alpha1.Bridge) []string
- func GetResourceNamesFromResource(resources []model.ResourceOwnedByTenant) []v1alpha1.NamespacedName
- type BaseManager
- type BridgeManager
- type CollectorManager
- func (c *CollectorManager) BuildConfigInputForCollector(ctx context.Context, collector *v1alpha1.Collector) (otelcolconfgen.OtelColConfigInput, error)
- func (c *CollectorManager) OtelCollector(collector *v1alpha1.Collector, otelConfig otelv1beta1.Config, ...) (*otelv1beta1.OpenTelemetryCollector, reconciler.DesiredState)
- func (c *CollectorManager) ReconcileRBAC(collector *v1alpha1.Collector, scheme *runtime.Scheme) (v1alpha1.NamespacedName, error)
- func (c *CollectorManager) ValidateConfigInput(cfgInput otelcolconfgen.OtelColConfigInput) error
- type TenantResourceManager
- func (t *TenantResourceManager) DisownResources(ctx context.Context, resourceToDisown []model.ResourceOwnedByTenant)
- func (t *TenantResourceManager) GetLogsourceNamespaceNamesForTenant(ctx context.Context, tenant *v1alpha1.Tenant) ([]string, error)
- func (t *TenantResourceManager) GetResourceOwnedByTenant(ctx context.Context, resource model.ResourceOwnedByTenant, ...) (ownedList []model.ResourceOwnedByTenant, ...)
- func (t *TenantResourceManager) GetResourcesReferencingTenantButNotSelected(ctx context.Context, tenant *v1alpha1.Tenant, ...) ([]model.ResourceOwnedByTenant, error)
- func (t *TenantResourceManager) UpdateResourcesForTenant(ctx context.Context, tenantName string, ...) (updatedResources []model.ResourceOwnedByTenant)
- func (t *TenantResourceManager) ValidateSubscriptionReferencedOutputsWithCache(ctx context.Context, subscription *v1alpha1.Subscription, ...) ([]v1alpha1.NamespacedName, []string)
Constants ¶
This section is empty.
Variables ¶
var ( ErrTenantFailed = errors.New("tenant failed") ErrNoResources = errors.New("there are no resources deployed that the collector(s) can use") )
Functions ¶
func GetResourceNamesFromResource ¶
func GetResourceNamesFromResource(resources []model.ResourceOwnedByTenant) []v1alpha1.NamespacedName
Types ¶
type BaseManager ¶
BaseManager provides common functionality for all managers
func NewBaseManager ¶
func NewBaseManager(client client.Client, logger logr.Logger) BaseManager
NewBaseManager creates a new base manager
func (*BaseManager) GetBridgeManager ¶
func (b *BaseManager) GetBridgeManager() *BridgeManager
func (*BaseManager) GetTenantResourceManager ¶
func (b *BaseManager) GetTenantResourceManager() *TenantResourceManager
type BridgeManager ¶
type BridgeManager struct {
BaseManager
}
BridgeManager manages bridge resources
func (*BridgeManager) GetBridgesForTenant ¶
func (*BridgeManager) ValidateBridgeConnection ¶
type CollectorManager ¶
type CollectorManager struct {
BaseManager
}
CollectorManager manages collector resources
func (*CollectorManager) BuildConfigInputForCollector ¶
func (c *CollectorManager) BuildConfigInputForCollector(ctx context.Context, collector *v1alpha1.Collector) (otelcolconfgen.OtelColConfigInput, error)
func (*CollectorManager) OtelCollector ¶
func (c *CollectorManager) OtelCollector(collector *v1alpha1.Collector, otelConfig otelv1beta1.Config, additionalArgs map[string]string, tenants []v1alpha1.Tenant, outputs []components.OutputWithSecretData, saName string) (*otelv1beta1.OpenTelemetryCollector, reconciler.DesiredState)
func (*CollectorManager) ReconcileRBAC ¶
func (c *CollectorManager) ReconcileRBAC(collector *v1alpha1.Collector, scheme *runtime.Scheme) (v1alpha1.NamespacedName, error)
func (*CollectorManager) ValidateConfigInput ¶
func (c *CollectorManager) ValidateConfigInput(cfgInput otelcolconfgen.OtelColConfigInput) error
type TenantResourceManager ¶
type TenantResourceManager struct {
BaseManager
}
TenantResourceManager is a manager for resources owned by tenants: Subscriptions and Outputs
func (*TenantResourceManager) DisownResources ¶
func (t *TenantResourceManager) DisownResources(ctx context.Context, resourceToDisown []model.ResourceOwnedByTenant)
disownResources fails internally by logging errors individually this is by design so that we don't fail the whole reconciliation when a single resource cannot be disowned
func (*TenantResourceManager) GetLogsourceNamespaceNamesForTenant ¶
func (t *TenantResourceManager) GetLogsourceNamespaceNamesForTenant(ctx context.Context, tenant *v1alpha1.Tenant) ([]string, error)
GetLogsourceNamespaceNamesForTenant returns the namespaces that match the log source namespace selectors of the tenant
func (*TenantResourceManager) GetResourceOwnedByTenant ¶
func (t *TenantResourceManager) GetResourceOwnedByTenant(ctx context.Context, resource model.ResourceOwnedByTenant, tenant *v1alpha1.Tenant) (ownedList []model.ResourceOwnedByTenant, updateList []model.ResourceOwnedByTenant, err error)
GetResourceOwnedByTenant returns a list of resources owned by the tenant and a list of resources that need to be updated
func (*TenantResourceManager) GetResourcesReferencingTenantButNotSelected ¶
func (t *TenantResourceManager) GetResourcesReferencingTenantButNotSelected(ctx context.Context, tenant *v1alpha1.Tenant, resource model.ResourceOwnedByTenant, selectedResources []model.ResourceOwnedByTenant) ([]model.ResourceOwnedByTenant, error)
GetResourcesReferencingTenantButNotSelected returns a list of resources that are referencing the tenant in their status but are not selected by the tenant directly
func (*TenantResourceManager) UpdateResourcesForTenant ¶
func (t *TenantResourceManager) UpdateResourcesForTenant(ctx context.Context, tenantName string, resources []model.ResourceOwnedByTenant) (updatedResources []model.ResourceOwnedByTenant)
updateResourcesForTenant fails internally and logs failures individually this is by design in order to avoid blocking the whole reconciliation in case we cannot update a single resource
func (*TenantResourceManager) ValidateSubscriptionReferencedOutputsWithCache ¶
func (t *TenantResourceManager) ValidateSubscriptionReferencedOutputsWithCache(ctx context.Context, subscription *v1alpha1.Subscription, outputMap map[v1alpha1.NamespacedName]*v1alpha1.Output) ([]v1alpha1.NamespacedName, []string)
ValidateSubscriptionReferencedOutputsWithCache validates outputs referenced by the subscription using a provided cache of outputs