Documentation ¶
Index ¶
- type NodeQuotaConfigReconciler
- func (r *NodeQuotaConfigReconciler) CalculateRootSubnamespaces(ctx context.Context, config *danav1alpha1.NodeQuotaConfig, logger logr.Logger) (bool, error)
- func (r *NodeQuotaConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *NodeQuotaConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *NodeQuotaConfigReconciler) UpdateConfigStatus(ctx context.Context, config *danav1alpha1.NodeQuotaConfig, logger logr.Logger) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeQuotaConfigReconciler ¶
NodeQuotaConfigReconciler reconciles a NodeQuotaConfig object
func (*NodeQuotaConfigReconciler) CalculateRootSubnamespaces ¶
func (r *NodeQuotaConfigReconciler) CalculateRootSubnamespaces(ctx context.Context, config *danav1alpha1.NodeQuotaConfig, logger logr.Logger) (bool, error)
CalculateRootSubnamespaces calculates the resource allocation for the root subnamespaces based on the provided NodeQuotaConfig. It takes a context, the NodeQuotaConfig to reconcile, and a logger for logging informational messages. It returns an error (if any occurred) during the calculation. If an error occurs during the updating of the root subnamespaces, it logs the error but continues. This is due to the fact that many times, errors occur because nodes have been added or removed from the cluster since the last calculation.
func (*NodeQuotaConfigReconciler) SetupWithManager ¶
func (r *NodeQuotaConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*NodeQuotaConfigReconciler) UpdateConfigStatus ¶
func (r *NodeQuotaConfigReconciler) UpdateConfigStatus(ctx context.Context, config *danav1alpha1.NodeQuotaConfig, logger logr.Logger) error
UpdateConfigStatus updates the status of the NodeQuotaConfig if it's different from the current status.