controllers

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MirrorSyncedResources counts successful resource sync operations.
	MirrorSyncedResources = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "tunnel_mirror_synced_resources_total",
			Help: "Total mirror resource sync operations that succeeded.",
		},
		[]string{"resource_type"},
	)
	// MirrorSyncErrors counts failed resource sync operations.
	MirrorSyncErrors = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "tunnel_mirror_sync_errors_total",
			Help: "Total mirror resource sync operations that failed.",
		},
		[]string{"resource_type"},
	)
	// MirrorHeartbeatFailures counts heartbeat lease renewal failures.
	MirrorHeartbeatFailures = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "tunnel_mirror_heartbeat_failures_total",
			Help: "Total mirror heartbeat lease renewal failures.",
		},
	)
)

Functions

This section is empty.

Types

type MirrorReconciler

type MirrorReconciler struct {
	// contains filtered or unexported fields
}

MirrorReconciler watches local Gateway API resources and mirrors them to Apoxy.

func NewMirrorReconciler

func NewMirrorReconciler(
	localClient client.Client,
	apoxyClient versioned.Interface,
	cfg *configv1alpha1.KubeMirrorConfig,
) *MirrorReconciler

NewMirrorReconciler creates a new MirrorReconciler.

func (*MirrorReconciler) RunHeartbeat

func (r *MirrorReconciler) RunHeartbeat(ctx context.Context, namespace string) error

RunHeartbeat periodically creates or renews a coordination Lease to signal that this mirror controller is alive. The GC controller on the cloud side uses lease expiry to clean up orphaned mirrored objects.

func (*MirrorReconciler) SetupWithManager

func (r *MirrorReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager registers controllers for each Gateway API resource type.

Jump to

Keyboard shortcuts

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