controller

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FinalizerName   = "vidraresource.infrahub.operators.com/finalizer"
	OwnerAnnotation = "vidraresource.infrahub.operators.com/owned-by"
)

Variables

This section is empty.

Functions

func MarkState

func MarkState(
	ctx context.Context,
	c client.StatusClient,
	res client.Object,
	updateStatus func(),
) error

MarkSyncState updates the resource's SyncState using the provided update function. It retries on conflict using the default backoff strategy.

func MarkStateFailed

func MarkStateFailed(
	ctx context.Context,
	c client.StatusClient,
	res client.Object,
	originalErr error,
) error

MarkSyncFailed sets the resource's SyncState to Failed and logs the error. It calls MarkSyncState to handle the update, retrying on conflict.

Types

type InfrahubSyncReconciler

type InfrahubSyncReconciler struct {
	client.Client
	Scheme         *runtime.Scheme
	RequeueAfter   time.Duration
	QueryName      string
	InfrahubClient domain.InfrahubClient
}

func (*InfrahubSyncReconciler) InitConfigWithClient

func (r *InfrahubSyncReconciler) InitConfigWithClient(ctx context.Context, k8sClient client.Client, labelKey, labelValue string) error

InitConfigWithClient initializes the InfrahubSyncReconciler configuration

func (*InfrahubSyncReconciler) Reconcile

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

func (*InfrahubSyncReconciler) SetupWithManager

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

type VidraResourceReconciler

type VidraResourceReconciler struct {
	client.Client
	Scheme                     *runtime.Scheme
	RESTMapper                 meta.RESTMapper
	InfrahubClient             domain.InfrahubClient
	DynamicMulticlusterFactory domain.DynamicMulticlusterFactory
	DynamicWatcherFactory      domain.DynamicWatcherFactory
	DynamicWatcherClient       dynamic.Interface
	RequeueAfter               time.Duration
	EventBasedReconcile        bool
}

func (*VidraResourceReconciler) InitConfigWithClient

func (r *VidraResourceReconciler) InitConfigWithClient(ctx context.Context, k8sClient client.Client, labelKey, labelValue string) error

InitConfigWithClient initializes the VidraResourceReconciler configuration.

func (*VidraResourceReconciler) Reconcile

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

func (*VidraResourceReconciler) SetupWithManager

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

Setup

Jump to

Keyboard shortcuts

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