Documentation ¶
Index ¶
- func ComputeUsedCapacity(quota kanodiov1alpha1.Quota, hostList []kanodiov1alpha1.HostClaim) (int, error)
- func SetupHostClaimWebhookWithManager(mgr ctrl.Manager) error
- type HostClaimCustomDefaulter
- type HostClaimCustomValidator
- func (v *HostClaimCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *HostClaimCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *HostClaimCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeUsedCapacity ¶
func ComputeUsedCapacity( quota kanodiov1alpha1.Quota, hostList []kanodiov1alpha1.HostClaim, ) (int, error)
compute current usage for a specific quota label
func SetupHostClaimWebhookWithManager ¶
SetupHostClaimWebhookWithManager registers the webhook for HostClaim in the manager.
Types ¶
type HostClaimCustomDefaulter ¶
type HostClaimCustomDefaulter struct { }
HostClaimCustomDefaulter struct is responsible for setting default values on the custom resource of the Kind HostClaim when those are created or updated.
NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as it is used only for temporary operations and does not need to be deeply copied.
type HostClaimCustomValidator ¶
type HostClaimCustomValidator struct { }
func (*HostClaimCustomValidator) ValidateCreate ¶
func (v *HostClaimCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type HostClaim.
func (*HostClaimCustomValidator) ValidateDelete ¶
func (v *HostClaimCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type HostClaim.
func (*HostClaimCustomValidator) ValidateUpdate ¶
func (v *HostClaimCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type HostClaim.