Documentation ¶
Index ¶
- type DHCPHostReconciler
- type DHCPServerReconciler
- type DHCPSubnetReconciler
- type ObjectsCache
- func (s *ObjectsCache) AddHostIfNotKnown(host dhcpv1alpha1.DHCPHost) bool
- func (s *ObjectsCache) AddLease(mac string)
- func (s *ObjectsCache) AddSubnetIfNotKnown(subnet dhcp.Subnet) bool
- func (s *ObjectsCache) HasLease(mac string) bool
- func (s *ObjectsCache) PopUnknownHosts(subnet dhcp.SubnetAddrPrefix) []dhcpv1alpha1.DHCPHost
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DHCPHostReconciler ¶
type DHCPHostReconciler struct { client.Client Scheme *runtime.Scheme DHCPServer *dhcp.Server // contains filtered or unexported fields }
DHCPHostReconciler reconciles a DHCPHost object
func NewDHCPHostReconciler ¶
func NewDHCPHostReconciler(c client.Client, scheme *runtime.Scheme, knownObjects *ObjectsCache) *DHCPHostReconciler
func (*DHCPHostReconciler) Reconcile ¶
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 DHCPHost 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.11.0/pkg/reconcile
func (*DHCPHostReconciler) SetupWithManager ¶
func (r *DHCPHostReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DHCPServerReconciler ¶
type DHCPServerReconciler struct { client.Client Scheme *runtime.Scheme DHCPServer *dhcp.Server // contains filtered or unexported fields }
DHCPServerReconciler reconciles a DHCPServer object
func NewDHCPServerReconciler ¶
func NewDHCPServerReconciler(c client.Client, scheme *runtime.Scheme, cache *ObjectsCache, log dhcp.RLogger) *DHCPServerReconciler
func (*DHCPServerReconciler) Initialize ¶
func (r *DHCPServerReconciler) Initialize(ctx context.Context) error
func (*DHCPServerReconciler) Reconcile ¶
func (r *DHCPServerReconciler) 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 DHCPServer 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.11.0/pkg/reconcile
func (*DHCPServerReconciler) SetupWithManager ¶
func (r *DHCPServerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DHCPSubnetReconciler ¶
type DHCPSubnetReconciler struct { client.Client Scheme *runtime.Scheme DHCPServer *dhcp.Server SubnetCache map[string]dhcp.SubnetAddrPrefix SubnetToObjectKey map[dhcp.SubnetAddrPrefix]client.ObjectKey // contains filtered or unexported fields }
DHCPSubnetReconciler reconciles a DHCPSubnet object
func NewDHCPSubnetReconciler ¶
func NewDHCPSubnetReconciler(c client.Client, scheme *runtime.Scheme, storage *ObjectsCache) *DHCPSubnetReconciler
func (*DHCPSubnetReconciler) CallbackSaveLeases ¶
func (r *DHCPSubnetReconciler) CallbackSaveLeases(responses []dhcp.Response) error
func (*DHCPSubnetReconciler) Reconcile ¶
func (r *DHCPSubnetReconciler) 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 DHCPSubnet 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.11.0/pkg/reconcile
func (*DHCPSubnetReconciler) SetupWithManager ¶
func (r *DHCPSubnetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ObjectsCache ¶
ObjectsCache is temporary storage for objects with yet unknown owners, e.g. at startup DHCPSubnet may be loaded before DHCPServer
func NewObjectsCache ¶
func NewObjectsCache() *ObjectsCache
func (*ObjectsCache) AddHostIfNotKnown ¶
func (s *ObjectsCache) AddHostIfNotKnown(host dhcpv1alpha1.DHCPHost) bool
func (*ObjectsCache) AddLease ¶
func (s *ObjectsCache) AddLease(mac string)
func (*ObjectsCache) AddSubnetIfNotKnown ¶
func (s *ObjectsCache) AddSubnetIfNotKnown(subnet dhcp.Subnet) bool
func (*ObjectsCache) HasLease ¶
func (s *ObjectsCache) HasLease(mac string) bool
func (*ObjectsCache) PopUnknownHosts ¶
func (s *ObjectsCache) PopUnknownHosts(subnet dhcp.SubnetAddrPrefix) []dhcpv1alpha1.DHCPHost