Documentation ¶
Index ¶
- func GetSecretValue(ctx context.Context, clnt client.Client, namespace string, ...) (string, error)
- type LBRegistrarReconciler
- type NodeHandler
- func (nh *NodeHandler) Create(ctx context.Context, evt event.CreateEvent, _ workqueue.RateLimitingInterface)
- func (nh *NodeHandler) Delete(ctx context.Context, evt event.DeleteEvent, _ workqueue.RateLimitingInterface)
- func (nh *NodeHandler) Generic(context.Context, event.GenericEvent, workqueue.RateLimitingInterface)
- func (nh *NodeHandler) Update(ctx context.Context, evt event.UpdateEvent, _ workqueue.RateLimitingInterface)
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 ¶
func (nh *NodeHandler) Create(ctx context.Context, evt event.CreateEvent, _ workqueue.RateLimitingInterface)
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 ¶
func (nh *NodeHandler) Delete(ctx context.Context, evt event.DeleteEvent, _ workqueue.RateLimitingInterface)
Delete handles node deletion events. It deletes NodeClean object for deleted node.
func (*NodeHandler) Generic ¶
func (nh *NodeHandler) Generic(context.Context, event.GenericEvent, workqueue.RateLimitingInterface)
func (*NodeHandler) Update ¶
func (nh *NodeHandler) Update(ctx context.Context, evt event.UpdateEvent, _ workqueue.RateLimitingInterface)
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.