utils

package
v1.0.145 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOdigosEffectiveConfigNotFound = errors.New("odigos effective config not found")

error to indicate specifically that odigos effective config is not found. it can be used to differentiate and react specifically to this error. the effective config is reconciled in the scheduler, so it is possible to have a situation where the config is not found when odigos starts.

View Source
var OtherAgentRunError = errors.New("device not added to any container due to the presence of another agent")

Functions

func ApplyCollectorGroup added in v1.0.117

func ApplyCollectorGroup(ctx context.Context, c client.Client, collectorGroup *odigosv1.CollectorsGroup) error

func DeleteCollectorGroup

func DeleteCollectorGroup(ctx context.Context, c client.Client, namespace string, collectorGroupName string) error

func GetCollectorGroup

func GetCollectorGroup(ctx context.Context, c client.Client, namespace string, collectorGroupName string) (*odigosv1.CollectorsGroup, error)

func GetCurrentOdigosConfig added in v1.0.93

func GetCurrentOdigosConfig(ctx context.Context, k8sClient client.Client) (common.OdigosConfiguration, error)

func GetCurrentOdigosTier added in v1.0.112

func GetCurrentOdigosTier(ctx context.Context, namespaces string, client *kubernetes.Clientset) (common.OdigosTier, error)

func IsItemIgnored added in v1.0.143

func IsItemIgnored(item string, ignoredItems []string) bool

func IsTerminating added in v1.0.144

func IsTerminating(obj client.Object) bool

IsTerminating returns true if a client.Object has a non-zero DeletionTimestamp. Otherwise, it returns false.

func K8SNoEffectiveConfigErrorHandler added in v1.0.143

func K8SNoEffectiveConfigErrorHandler(err error) (reconcile.Result, error)

func K8SUpdateErrorHandler added in v1.0.131

func K8SUpdateErrorHandler(err error) (reconcile.Result, error)

K8SUpdateErrorHandler is a helper function to handle k8s update errors. It returns a reconcile.Result and an error If the error is a conflict error, it returns a requeue result without an error If the error is a not found error, it returns an empty result without an error For other errors, it returns the error as is - which will cause a requeue

Types

This section is empty.

Jump to

Keyboard shortcuts

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