webhook

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package webhook serves the admission endpoint that checks a CustomResourceProjection before the cluster accepts it.

Index

Constants

View Source
const Path = "/admission/customresourceprojections"

Path is where the projection webhook is served.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	Check(ctx context.Context, p *crispv1alpha1.CustomResourceProjection) error
}

Checker answers whether a projection could be served. dynamic.Compiler is the implementation, which is what keeps this from being able to accept something the server would then refuse.

type Handler

type Handler struct {
	Checker Checker
}

Handler validates CustomResourceProjection objects at admission.

This exists because the status condition arrives too late to be useful. A projection whose SQL has outlived its schema compiles, reports CompilationFailed, and is not served — but kubectl apply has already succeeded, so the author has to know to go and look. Answering here puts the database's own error where the mistake was made.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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