webhooks

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(mgr ctrl.Manager) (string, error)

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

func ValidateWorkload

func ValidateWorkload(obj *kueue.Workload) field.ErrorList

func ValidateWorkloadUpdate

func ValidateWorkloadUpdate(newObj, oldObj *kueue.Workload) 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

func (w *ClusterQueueWebhook) Default(ctx context.Context, obj runtime.Object) error

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

func (w *WorkloadWebhook) Default(ctx context.Context, obj runtime.Object) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL