Documentation
¶
Overview ¶
Package controller contains the core reconciliation logic for the UnDyingProxy operator. It manages the lifecycle of UnDyingProxy custom resources, setting up TCP and UDP forwarders, managing associated Kubernetes Services, and handling finalizers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UnDyingProxyReconciler ¶
type UnDyingProxyReconciler struct { client.Client Scheme *runtime.Scheme UDPServiceToManage string TCPServiceToManage string UDPBufferBytes int }
UnDyingProxyReconciler reconciles a UnDyingProxy object. It holds the client for interacting with the Kubernetes API, the scheme for object type mapping, configuration for managed services, and UDP buffer size.
func (*UnDyingProxyReconciler) Reconcile ¶
func (r *UnDyingProxyReconciler) 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 defined in the UnDyingProxy custom resource.
It performs the following steps: 1. Fetches the UnDyingProxy instance. 2. Handles deletion logic if the resource is marked for deletion. 3. Ensures the finalizer is present on the resource. 4. Manages TCP forwarding if specified in the spec. 5. Manages UDP forwarding if specified in the spec. 6. Updates the status to Ready.
func (*UnDyingProxyReconciler) SetupWithManager ¶
func (r *UnDyingProxyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager. It configures the controller to watch UnDyingProxy resources and sets the maximum number of concurrent reconciles.