webhook

package
v1.12.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessManagementValidator

type AccessManagementValidator struct {
	client.Client

	// RESTMapper is used to resolve the scope (namespaced vs cluster-scoped) of a
	// ResourceRule's Kind at admission time. Populated by SetupWebhookWithManager; left unset
	// only in tests that don't exercise the scope check.
	RESTMapper apimeta.RESTMapper

	SystemNamespace string
}

AccessManagementValidator validates and defaults AccessManagement objects.

Its Default method also carries the automatic migration of the deprecated one-field-per-Kind AccessRule selectors (ClusterTemplateChains, ServiceTemplateChains, Credentials, ClusterAuthentications, DataSources, ClusterAuditPolicies) into the generic Resources field, so existing manifests keep working unmodified while the controller only ever has to deal with the new shape.

func (*AccessManagementValidator) Default

Default implements webhook.Defaulter so a webhook will be registered for the type.

It migrates any deprecated one-field-per-Kind AccessRule selectors still populated into equivalent Resources entries, and defaults the APIVersion of Resources entries that omit it. Re-running against an already-migrated object is a no-op.

func (*AccessManagementValidator) SetupWebhookWithManager

func (v *AccessManagementValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*AccessManagementValidator) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*AccessManagementValidator) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*AccessManagementValidator) ValidateUpdate

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type ClusterAuditPolicyValidator added in v1.10.0

type ClusterAuditPolicyValidator struct {
	client.Client
}

func (*ClusterAuditPolicyValidator) SetupWebhookWithManager added in v1.10.0

func (v *ClusterAuditPolicyValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ClusterAuditPolicyValidator) ValidateCreate added in v1.10.0

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ClusterAuditPolicyValidator) ValidateDelete added in v1.10.0

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ClusterAuditPolicyValidator) ValidateUpdate added in v1.10.0

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ClusterAuthenticationValidator added in v1.6.0

type ClusterAuthenticationValidator struct {
	client.Client
}

func (*ClusterAuthenticationValidator) SetupWebhookWithManager added in v1.6.0

func (v *ClusterAuthenticationValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ClusterAuthenticationValidator) ValidateCreate added in v1.6.0

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterAuthenticationValidator) ValidateDelete added in v1.6.0

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterAuthenticationValidator) ValidateUpdate added in v1.6.0

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type ClusterDeploymentValidator

type ClusterDeploymentValidator struct {
	client.Client

	SystemNamespace            string
	ValidateClusterUpgradePath bool
}

func (*ClusterDeploymentValidator) Default

func (v *ClusterDeploymentValidator) Default(ctx context.Context, clusterDeployment *kcmv1.ClusterDeployment) error

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*ClusterDeploymentValidator) SetupWebhookWithManager

func (v *ClusterDeploymentValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ClusterDeploymentValidator) ValidateCreate

func (v *ClusterDeploymentValidator) ValidateCreate(ctx context.Context, clusterDeployment *kcmv1.ClusterDeployment) (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterDeploymentValidator) ValidateDelete

func (v *ClusterDeploymentValidator) ValidateDelete(ctx context.Context, clusterDeployment *kcmv1.ClusterDeployment) (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterDeploymentValidator) ValidateUpdate

func (v *ClusterDeploymentValidator) ValidateUpdate(ctx context.Context, oldClusterDeployment, newClusterDeployment *kcmv1.ClusterDeployment) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type ClusterTemplateChainValidator

type ClusterTemplateChainValidator struct {
	client.Client
	SystemNamespace string
}

func (*ClusterTemplateChainValidator) SetupWebhookWithManager

func (in *ClusterTemplateChainValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ClusterTemplateChainValidator) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterTemplateChainValidator) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterTemplateChainValidator) ValidateUpdate

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type ClusterTemplateValidator

type ClusterTemplateValidator struct {
	TemplateValidator
}

func (*ClusterTemplateValidator) Default

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*ClusterTemplateValidator) SetupWebhookWithManager

func (v *ClusterTemplateValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ClusterTemplateValidator) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterTemplateValidator) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterTemplateValidator) ValidateUpdate

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type ManagementValidator

type ManagementValidator struct {
	client.Client
}

func (*ManagementValidator) SetupWebhookWithManager

func (v *ManagementValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ManagementValidator) ValidateCreate

func (v *ManagementValidator) ValidateCreate(ctx context.Context, obj *kcmv1.Management) (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ManagementValidator) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ManagementValidator) ValidateUpdate

func (v *ManagementValidator) ValidateUpdate(ctx context.Context, oldObj, newObj *kcmv1.Management) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type ProviderTemplateValidator

type ProviderTemplateValidator struct {
	TemplateValidator
}

func (*ProviderTemplateValidator) Default

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*ProviderTemplateValidator) SetupWebhookWithManager

func (v *ProviderTemplateValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ProviderTemplateValidator) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ProviderTemplateValidator) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ProviderTemplateValidator) ValidateUpdate

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type RegionValidator added in v1.5.0

type RegionValidator struct {
	client.Client

	SystemNamespace string
}

func (*RegionValidator) SetupWebhookWithManager added in v1.5.0

func (v *RegionValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*RegionValidator) ValidateCreate added in v1.5.0

func (v *RegionValidator) ValidateCreate(ctx context.Context, obj *kcmv1.Region) (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*RegionValidator) ValidateDelete added in v1.5.0

func (v *RegionValidator) ValidateDelete(ctx context.Context, obj *kcmv1.Region) (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*RegionValidator) ValidateUpdate added in v1.5.0

func (v *RegionValidator) ValidateUpdate(ctx context.Context, oldObj, newObj *kcmv1.Region) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type ReleaseValidator

type ReleaseValidator struct {
	client.Client
}

func (*ReleaseValidator) SetupWebhookWithManager

func (v *ReleaseValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager will setup the manager to manage the webhooks

func (*ReleaseValidator) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ReleaseValidator) ValidateDelete

func (v *ReleaseValidator) ValidateDelete(ctx context.Context, obj *kcmv1.Release) (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ReleaseValidator) ValidateUpdate

func (*ReleaseValidator) ValidateUpdate(_ context.Context, _, _ *kcmv1.Release) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ServiceTemplateChainValidator

type ServiceTemplateChainValidator struct {
	client.Client
	SystemNamespace string
}

func (*ServiceTemplateChainValidator) SetupWebhookWithManager

func (in *ServiceTemplateChainValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ServiceTemplateChainValidator) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ServiceTemplateChainValidator) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ServiceTemplateChainValidator) ValidateUpdate

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type ServiceTemplateValidator

type ServiceTemplateValidator struct {
	TemplateValidator
}

func (*ServiceTemplateValidator) Default

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*ServiceTemplateValidator) SetupWebhookWithManager

func (v *ServiceTemplateValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ServiceTemplateValidator) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ServiceTemplateValidator) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ServiceTemplateValidator) ValidateUpdate

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type TemplateValidator

type TemplateValidator struct {
	client.Client
	SystemNamespace string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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