webhooks

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: Apache-2.0 Imports: 29 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Year               = 365 * 24 * time.Hour
	CertDirPath        = "/tmp/k8s-webhook-server/serving-certs"
	CertFilename       = "tls.crt"
	PrivateKeyFilename = "tls.key"
)

Variables

This section is empty.

Functions

func UpdateWebHookCA

func UpdateWebHookCA(ctx context.Context, webHookName string, ca []byte) error

func WriteCertToFiles

func WriteCertToFiles(bundle CertificateBundle) error

Types

type CertificateBundle

type CertificateBundle struct {
	CertPem       []byte
	PrivateKeyPem []byte
}

func GenerateSelfSignedCertificate

func GenerateSelfSignedCertificate(hostname string, namespace string) (CertificateBundle, error)

type IntentsValidator

type IntentsValidator struct {
	client.Client
}

func NewIntentsValidator

func NewIntentsValidator(c client.Client) *IntentsValidator

func (*IntentsValidator) SetupWebhookWithManager

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

func (*IntentsValidator) ValidateCreate

func (v *IntentsValidator) ValidateCreate(ctx context.Context, obj runtime.Object) error

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

func (*IntentsValidator) ValidateDelete

func (v *IntentsValidator) ValidateDelete(ctx context.Context, obj runtime.Object) error

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

func (*IntentsValidator) ValidateUpdate

func (v *IntentsValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) error

ValidateUpdate implements webhook.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