Documentation ¶
Index ¶
- func Setup(mgr ctrl.Manager) (string, error)
- func ValidateClusterQueue(cq *kueue.ClusterQueue) field.ErrorList
- func ValidateClusterQueueUpdate(newObj, oldObj *kueue.ClusterQueue) field.ErrorList
- func ValidateLocalQueue(q *kueue.LocalQueue) field.ErrorList
- func ValidateLocalQueueUpdate(newObj, oldObj *kueue.LocalQueue) field.ErrorList
- func ValidateResourceFlavor(rf *kueue.ResourceFlavor) field.ErrorList
- func ValidateWorkload(obj *kueue.Workload) field.ErrorList
- func ValidateWorkloadUpdate(newObj, oldObj *kueue.Workload) field.ErrorList
- type AdmissionCheckWebhook
- func (w *AdmissionCheckWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *AdmissionCheckWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *AdmissionCheckWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type ClusterQueueWebhook
- func (w *ClusterQueueWebhook) Default(ctx context.Context, obj runtime.Object) error
- func (w *ClusterQueueWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *ClusterQueueWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *ClusterQueueWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type LocalQueueWebhook
- func (w *LocalQueueWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *LocalQueueWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *LocalQueueWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type ResourceFlavorWebhook
- func (w *ResourceFlavorWebhook) Default(ctx context.Context, obj runtime.Object) error
- func (w *ResourceFlavorWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *ResourceFlavorWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *ResourceFlavorWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type WorkloadWebhook
- func (w *WorkloadWebhook) Default(ctx context.Context, obj runtime.Object) error
- func (w *WorkloadWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *WorkloadWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *WorkloadWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Setup ¶
Setup sets up the webhooks for core controllers. It returns the name of the webhook that failed to create and an error, if any.
func ValidateClusterQueue ¶
func ValidateClusterQueue(cq *kueue.ClusterQueue) field.ErrorList
func ValidateClusterQueueUpdate ¶
func ValidateClusterQueueUpdate(newObj, oldObj *kueue.ClusterQueue) field.ErrorList
Since Kubernetes 1.25, we can use CEL validation rules to implement a few common immutability patterns directly in the manifest for a CRD. ref: https://kubernetes.io/blog/2022/09/29/enforce-immutability-using-cel/ We need to validate the spec.queueingStrategy immutable manually before Kubernetes 1.25.
func ValidateLocalQueue ¶
func ValidateLocalQueue(q *kueue.LocalQueue) field.ErrorList
func ValidateLocalQueueUpdate ¶
func ValidateLocalQueueUpdate(newObj, oldObj *kueue.LocalQueue) field.ErrorList
func ValidateResourceFlavor ¶
func ValidateResourceFlavor(rf *kueue.ResourceFlavor) field.ErrorList
Types ¶
type AdmissionCheckWebhook ¶ added in v0.5.0
type AdmissionCheckWebhook struct{}
func (*AdmissionCheckWebhook) ValidateCreate ¶ added in v0.5.0
func (w *AdmissionCheckWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*AdmissionCheckWebhook) ValidateDelete ¶ added in v0.5.0
func (w *AdmissionCheckWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*AdmissionCheckWebhook) ValidateUpdate ¶ added in v0.5.0
func (w *AdmissionCheckWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type
type ClusterQueueWebhook ¶
type ClusterQueueWebhook struct{}
func (*ClusterQueueWebhook) Default ¶
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
func (*ClusterQueueWebhook) ValidateCreate ¶
func (w *ClusterQueueWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*ClusterQueueWebhook) ValidateDelete ¶
func (w *ClusterQueueWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*ClusterQueueWebhook) ValidateUpdate ¶
func (w *ClusterQueueWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type
type LocalQueueWebhook ¶
type LocalQueueWebhook struct{}
func (*LocalQueueWebhook) ValidateCreate ¶
func (w *LocalQueueWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*LocalQueueWebhook) ValidateDelete ¶
func (w *LocalQueueWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*LocalQueueWebhook) ValidateUpdate ¶
func (w *LocalQueueWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type
type ResourceFlavorWebhook ¶
type ResourceFlavorWebhook struct{}
func (*ResourceFlavorWebhook) Default ¶
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
func (*ResourceFlavorWebhook) ValidateCreate ¶
func (w *ResourceFlavorWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*ResourceFlavorWebhook) ValidateDelete ¶
func (w *ResourceFlavorWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*ResourceFlavorWebhook) ValidateUpdate ¶
func (w *ResourceFlavorWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type
type WorkloadWebhook ¶
type WorkloadWebhook struct{}
func (*WorkloadWebhook) Default ¶
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
func (*WorkloadWebhook) ValidateCreate ¶
func (w *WorkloadWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*WorkloadWebhook) ValidateDelete ¶
func (w *WorkloadWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*WorkloadWebhook) ValidateUpdate ¶
func (w *WorkloadWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type