model

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 35

Documentation

Index

Constants

View Source
const (
	// WebhookKindMutating is the kind of the webhooks that mutate.
	WebhookKindMutating = "mutating"
	// WebhookKindValidating is the kind of the webhooks that validate.
	WebhookKindValidating = "validating"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdmissionResponse

type AdmissionResponse interface {
	// contains filtered or unexported methods
}

AdmissionResponse is the interface type that all the different types of webhooks must satisfy.

type AdmissionReview

type AdmissionReview struct {
	OriginalAdmissionReview runtime.Object

	ID           string
	Name         string
	Namespace    string
	Operation    AdmissionReviewOp
	Version      AdmissionReviewVersion
	RequestGVR   *metav1.GroupVersionResource
	RequestGVK   *metav1.GroupVersionKind
	OldObjectRaw []byte
	NewObjectRaw []byte
	DryRun       bool
	UserInfo     authenticationv1.UserInfo
}

AdmissionReview represents a request admission review.

func NewAdmissionReviewV1

func NewAdmissionReviewV1(ar *admissionv1.AdmissionReview) AdmissionReview

NewAdmissionReviewV1 returns a new AdmissionReview from a admission/v1/admissionReview.

func NewAdmissionReviewV1Beta1

func NewAdmissionReviewV1Beta1(ar *admissionv1beta1.AdmissionReview) AdmissionReview

NewAdmissionReviewV1Beta1 returns a new AdmissionReview from a admission/v1beta/admissionReview.

type AdmissionReviewOp

type AdmissionReviewOp string

AdmissionReviewOp represents an admission review operation.

const (
	// OperationUnknown is an unknown operation.
	OperationUnknown AdmissionReviewOp = "unknown"
	// OperationCreate is a create operation.
	OperationCreate AdmissionReviewOp = "create"
	// OperationUpdate is a update operation.
	OperationUpdate AdmissionReviewOp = "update"
	// OperationDelete is a delete operation.
	OperationDelete AdmissionReviewOp = "delete"
	// OperationConnect is a connect operation.
	OperationConnect AdmissionReviewOp = "connect"
)

type AdmissionReviewVersion

type AdmissionReviewVersion string

AdmissionReviewVersion reprensents the version of the admission review.

const (
	// AdmissionReviewVersionV1beta1 is the version of the v1beta1 webhooks admission review.
	AdmissionReviewVersionV1beta1 AdmissionReviewVersion = "v1beta1"

	// AdmissionReviewVersionV1 is the version of the v1 webhooks admission review.
	AdmissionReviewVersionV1 AdmissionReviewVersion = "v1"
)

type MutatingAdmissionResponse

type MutatingAdmissionResponse struct {
	ID             string
	JSONPatchPatch []byte
	Warnings       []string
	// contains filtered or unexported fields
}

MutatingAdmissionResponse is the response for mutating webhooks.

type ValidatingAdmissionResponse

type ValidatingAdmissionResponse struct {
	ID       string
	Allowed  bool
	Message  string
	Warnings []string
	// contains filtered or unexported fields
}

ValidatingAdmissionResponse is the response for validating webhooks.

type WebhookKind

type WebhookKind string

WebhookKind is the webhook kind.

Jump to

Keyboard shortcuts

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