webhook

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelName                = "name"
	ServicePort              = 443
	ServiceName              = "webhook"
	ServicePortName          = "webhook"
	ServiceLabelName         = "picchu-webhook"
	SecretName               = "webhook-cert"
	WebhookConfigurationName = "picchu-policy"
	ValidationWebhookName    = "picchu-validation.medium.engineering"
	MutationWebhookName      = "picchu-mutation.medium.engineering"
	CrtDir                   = "/tmp/k8s-webhook-server/serving-certs"
)

Variables

This section is empty.

Functions

func Init

func Init(cli client.Client, targetPort int32, namespace string, log logr.Logger)

Init creates all necessary infrastructure to support webhooks. Service, Secret, certs and WebhookConfigurations. It is intended to run on the same /tmp volume as the picchu operator which requires the certs to be present.

func Register

func Register(mgr manager.Manager)

Types

type Certificate

type Certificate struct {
	CaCrt []byte
	CaKey []byte
	Crt   []byte
	Key   []byte
}

func GenerateSelfSignedCertificate

func GenerateSelfSignedCertificate(hostname string) (*Certificate, error)

func MustGenerateSelfSignedCertificate

func MustGenerateSelfSignedCertificate(hostname string) *Certificate

func (*Certificate) CABundle

func (c *Certificate) CABundle() []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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