webhooks

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupProjectWebhookWithManager

func SetupProjectWebhookWithManager(ctx context.Context, mgr ctrl.Manager, identity string, si config.SharedInformation) error

func SetupWorkspaceWebhookWithManager

func SetupWorkspaceWebhookWithManager(ctx context.Context, mgr ctrl.Manager, identity string, si config.SharedInformation) error

Types

type ProjectWebhook

type ProjectWebhook struct {
	client.Client

	// Identity is the name of the entity (usually a service account) the project-workspace-operator uses to access the onboarding cluster.
	// It is required to exclude the operator's own identity from validation checks.
	Identity          string
	SharedInformation config.SharedInformation
}

+kubebuilder:object:generate=false

func (*ProjectWebhook) Default

func (p *ProjectWebhook) Default(ctx context.Context, obj *pwv1alpha1.Project) error

Default implements admission.Defaulter[*Project] so a webhook will be registered for the type

func (*ProjectWebhook) ValidateCreate

func (v *ProjectWebhook) ValidateCreate(ctx context.Context, obj *pwv1alpha1.Project) (warnings admission.Warnings, err error)

ValidateCreate implements admission.Validator[*Project] so a webhook will be registered for the type

func (*ProjectWebhook) ValidateDelete

func (v *ProjectWebhook) ValidateDelete(ctx context.Context, obj *pwv1alpha1.Project) (warnings admission.Warnings, err error)

ValidateDelete implements admission.Validator[*pwv1alpha1.Project] so a webhook will be registered for the type

func (*ProjectWebhook) ValidateUpdate

func (v *ProjectWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj *pwv1alpha1.Project) (warnings admission.Warnings, err error)

ValidateUpdate implements admission.Validator[*Project] so a webhook will be registered for the type

type WorkspaceWebhook

type WorkspaceWebhook struct {
	client.Client

	// Identity is the name of the entity (usually a service account) the project-workspace-operator uses to access the onboarding cluster.
	// It is required to exclude the operator's own identity from validation checks.
	Identity          string
	SharedInformation config.SharedInformation
}

+kubebuilder:object:generate=false

func (*WorkspaceWebhook) Default

func (w *WorkspaceWebhook) Default(ctx context.Context, obj *pwv1alpha1.Workspace) error

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

func (*WorkspaceWebhook) ValidateCreate

func (v *WorkspaceWebhook) ValidateCreate(ctx context.Context, obj *pwv1alpha1.Workspace) (warnings admission.Warnings, err error)

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

func (*WorkspaceWebhook) ValidateDelete

func (v *WorkspaceWebhook) ValidateDelete(ctx context.Context, obj *pwv1alpha1.Workspace) (warnings admission.Warnings, err error)

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

func (*WorkspaceWebhook) ValidateUpdate

func (v *WorkspaceWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj *pwv1alpha1.Workspace) (warnings admission.Warnings, err error)

ValidateUpdate implements admission.Validator 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