Documentation
¶
Index ¶
- Constants
- func SetupPodWebhookWithManager(mgr ctrl.Manager) error
- type PodCustomDefaulter
- type PodCustomValidator
- func (v *PodCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *PodCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *PodCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
const ( // TicketRequestAnnotation is used to request a specific ticket TicketRequestAnnotation = "korder.dev/ticket-request" // OrderRequestAnnotation is used to request resources from a specific order OrderRequestAnnotation = "korder.dev/order-request" // TicketClaimedAnnotation is set when a pod claims a ticket TicketClaimedAnnotation = "korder.dev/ticket-claimed" // TicketNodeAnnotation is set to indicate which node the ticket is bound to TicketNodeAnnotation = "korder.dev/ticket-node" )
Variables ¶
This section is empty.
Functions ¶
func SetupPodWebhookWithManager ¶
SetupPodWebhookWithManager registers the webhook for Pod in the manager.
Types ¶
type PodCustomDefaulter ¶
PodCustomDefaulter struct is responsible for setting default values on the custom resource of the Kind Pod 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 PodCustomValidator ¶
PodCustomValidator struct is responsible for validating the Pod resource when it is created, updated, or deleted.
NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as this struct is used only for temporary operations and does not need to be deeply copied.
func (*PodCustomValidator) ValidateCreate ¶
func (v *PodCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type Pod.
func (*PodCustomValidator) ValidateDelete ¶
func (v *PodCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type Pod.
func (*PodCustomValidator) ValidateUpdate ¶
func (v *PodCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type Pod.