Documentation ¶
Overview ¶
Package webhooks contains external webhook implementations for some of our API types.
Index ¶
- func DefaultAndValidateVariables(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass) field.ErrorList
- func DefaultVariables(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass) field.ErrorList
- func SetMinNodeStartupTimeout(d metav1.Duration)
- func ValidateClusterForClusterClass(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass) field.ErrorList
- type Cluster
- func (webhook *Cluster) Default(ctx context.Context, obj runtime.Object) error
- func (webhook *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (webhook *Cluster) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (webhook *Cluster) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (webhook *Cluster) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type ClusterClass
- func (webhook *ClusterClass) Default(_ context.Context, obj runtime.Object) error
- func (webhook *ClusterClass) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (webhook *ClusterClass) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (webhook *ClusterClass) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (webhook *ClusterClass) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type Machine
- func (webhook *Machine) Default(_ context.Context, obj runtime.Object) error
- func (webhook *Machine) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (webhook *Machine) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (webhook *Machine) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (webhook *Machine) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type MachineDeployment
- func (webhook *MachineDeployment) Default(ctx context.Context, obj runtime.Object) error
- func (webhook *MachineDeployment) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (webhook *MachineDeployment) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (webhook *MachineDeployment) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (webhook *MachineDeployment) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type MachineHealthCheck
- func (webhook *MachineHealthCheck) Default(_ context.Context, obj runtime.Object) error
- func (webhook *MachineHealthCheck) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (webhook *MachineHealthCheck) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (webhook *MachineHealthCheck) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (webhook *MachineHealthCheck) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type MachineSet
- func (webhook *MachineSet) Default(_ context.Context, obj runtime.Object) error
- func (webhook *MachineSet) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (webhook *MachineSet) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (webhook *MachineSet) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (webhook *MachineSet) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAndValidateVariables ¶ added in v1.4.0
func DefaultAndValidateVariables(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass) field.ErrorList
DefaultAndValidateVariables defaults and validates variables in the Cluster and MachineDeployment/MachinePool topologies based on the definitions in the ClusterClass.
func DefaultVariables ¶ added in v1.4.0
func DefaultVariables(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass) field.ErrorList
DefaultVariables defaults variables in the Cluster based on information in the ClusterClass.
func SetMinNodeStartupTimeout ¶ added in v1.6.0
SetMinNodeStartupTimeout allows users to optionally set a custom timeout for the validation webhook.
This function is mostly used within envtest (integration tests), and should never be used in a production environment.
func ValidateClusterForClusterClass ¶ added in v1.4.0
func ValidateClusterForClusterClass(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass) field.ErrorList
ValidateClusterForClusterClass uses information in the ClusterClass to validate the Cluster.
Types ¶
type Cluster ¶
Cluster implements a validating and defaulting webhook for Cluster.
func (*Cluster) SetupWebhookWithManager ¶
SetupWebhookWithManager sets up Cluster webhooks.
func (*Cluster) ValidateCreate ¶
func (webhook *Cluster) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
type ClusterClass ¶
ClusterClass implements a validation and defaulting webhook for ClusterClass.
func (*ClusterClass) SetupWebhookWithManager ¶
func (webhook *ClusterClass) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*ClusterClass) ValidateCreate ¶
func (webhook *ClusterClass) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements validation for ClusterClass create.
func (*ClusterClass) ValidateDelete ¶
func (webhook *ClusterClass) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements validation for ClusterClass delete.
func (*ClusterClass) ValidateUpdate ¶
func (webhook *ClusterClass) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements validation for ClusterClass update.
type Machine ¶ added in v1.6.0
type Machine struct{}
Machine implements a validation and defaulting webhook for Machine.
func (*Machine) Default ¶ added in v1.6.0
Default implements webhook.Defaulter so a webhook will be registered for the type.
func (*Machine) SetupWebhookWithManager ¶ added in v1.6.0
func (*Machine) ValidateCreate ¶ added in v1.6.0
func (webhook *Machine) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
type MachineDeployment ¶ added in v1.6.0
MachineDeployment implements a validation and defaulting webhook for MachineDeployment.
func (*MachineDeployment) SetupWebhookWithManager ¶ added in v1.6.0
func (webhook *MachineDeployment) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*MachineDeployment) ValidateCreate ¶ added in v1.6.0
func (webhook *MachineDeployment) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
func (*MachineDeployment) ValidateDelete ¶ added in v1.6.0
func (webhook *MachineDeployment) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
func (*MachineDeployment) ValidateUpdate ¶ added in v1.6.0
func (webhook *MachineDeployment) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
type MachineHealthCheck ¶ added in v1.6.0
type MachineHealthCheck struct{}
MachineHealthCheck implements a validation and defaulting webhook for MachineHealthCheck.
func (*MachineHealthCheck) Default ¶ added in v1.6.0
Default implements webhook.CustomDefaulter so a webhook will be registered for the type.
func (*MachineHealthCheck) SetupWebhookWithManager ¶ added in v1.6.0
func (webhook *MachineHealthCheck) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*MachineHealthCheck) ValidateCreate ¶ added in v1.6.0
func (webhook *MachineHealthCheck) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
func (*MachineHealthCheck) ValidateDelete ¶ added in v1.6.0
func (webhook *MachineHealthCheck) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
func (*MachineHealthCheck) ValidateUpdate ¶ added in v1.6.0
func (webhook *MachineHealthCheck) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.
type MachineSet ¶ added in v1.6.0
type MachineSet struct{}
MachineSet implements a validation and defaulting webhook for MachineSet.
func (*MachineSet) SetupWebhookWithManager ¶ added in v1.6.0
func (webhook *MachineSet) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*MachineSet) ValidateCreate ¶ added in v1.6.0
func (webhook *MachineSet) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
func (*MachineSet) ValidateDelete ¶ added in v1.6.0
func (webhook *MachineSet) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
func (*MachineSet) ValidateUpdate ¶ added in v1.6.0
func (webhook *MachineSet) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package runtime contains the webhook implementation for runtime ExtensionConfig.
|
Package runtime contains the webhook implementation for runtime ExtensionConfig. |
Package test contains integration tests for webhooks.
|
Package test contains integration tests for webhooks. |
Package util includes the utility functions for testing webhooks.
|
Package util includes the utility functions for testing webhooks. |