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

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