controller

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecretValue

func GetSecretValue(ctx context.Context, clnt client.Client, namespace string, sel *corev1.SecretKeySelector) (string, error)

GetSecretValue returns the value of a secret specified by the given secret key selector. It retrieves the secret from the provided client using the given context and namespace. If the secret cannot be retrieved, an error is returned.

Types

type LBRegistrarReconciler

type LBRegistrarReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

LBRegistrarReconciler reconciles a LBRegistrar object

func (*LBRegistrarReconciler) Reconcile

func (r *LBRegistrarReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the LBRegistrar object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile

func (*LBRegistrarReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NodeHandler

type NodeHandler struct {
	client.Client
	Recorder record.EventRecorder
}

NodeHandler is a struct that implements the EventHandler interface.

func (*NodeHandler) Create

Create is a method that handles node creation events. It creates a new NodeClean object if one does not already exist. It also registers the NodeClean object with the Kubernetes client. If an error occurs during the creation or registration process, it is logged.

func (*NodeHandler) Delete

Delete handles node deletion events. It deletes NodeClean object for deleted node.

func (*NodeHandler) Update

Update is a method that handles node update events. It calls the checkPhaseReady method to ensure that the node's phase can be ready. The result of the checkPhaseReady method is ignored.

Directories

Path Synopsis
cloud
oci

Jump to

Keyboard shortcuts

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