infra

package
v0.4.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// NetBirdCleanupFinalizer is added to RemoteMachines that need NetBird cleanup
	NetBirdCleanupFinalizer = "netbird.exalsius.ai/cleanup"
)

Variables

This section is empty.

Functions

func CleanupRemoteMachineNetBird added in v0.4.6

func CleanupRemoteMachineNetBird(ctx context.Context, c client.Client, rm *infrastructurev1beta1.RemoteMachine) error

CleanupRemoteMachineNetBird runs NetBird cleanup via SSH before k0smotron cleanup This function executes NetBird cleanup commands on a remote machine before k0smotron's finalizer logic runs, ensuring NetBird is properly stopped and cleaned up.

Types

type ColonyReconciler

type ColonyReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

ColonyReconciler reconciles a Colony object

func (*ColonyReconciler) Reconcile

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

+kubebuilder:rbac:groups=infra.exalsius.ai,resources=colonies,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=infra.exalsius.ai,resources=colonies/status,verbs=get;update;patch +kubebuilder:rbac:groups=infra.exalsius.ai,resources=colonies/finalizers,verbs=update +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=get;list;delete +kubebuilder:rbac:groups=apps,resources=deployments,verbs=create;delete;get;list;patch;update;watch +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch Note: Child cluster access (for Cilium ConfigMap creation) is done via kubeconfig secrets, which requires the secrets RBAC permission above. No additional RBAC is needed for child cluster resources.

func (*ColonyReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type RemoteMachineCleanupReconciler added in v0.4.6

type RemoteMachineCleanupReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

RemoteMachineCleanupReconciler watches RemoteMachine deletions and runs NetBird cleanup before k0smotron's finalizer logic executes. This ensures NetBird is properly stopped and cleaned up on remote machines before k0s cleanup runs.

func (*RemoteMachineCleanupReconciler) Reconcile added in v0.4.6

Reconcile watches for RemoteMachine deletions and runs NetBird cleanup if the finalizer is present. The webhook adds the finalizer to ALL RemoteMachines, but cleanup only runs if NetBird is actually enabled for the Colony that owns this RemoteMachine.

func (*RemoteMachineCleanupReconciler) SetupWithManager added in v0.4.6

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

SetupWithManager sets up the controller with the Manager.

type UserReconciler added in v0.3.4

type UserReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

UserReconciler reconciles a User object

func (*UserReconciler) Reconcile added in v0.3.4

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*UserReconciler) SetupWithManager added in v0.3.4

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

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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