resources

package
v0.0.0-...-696ba86 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CertFile        = "server-cert.pem"
	KeyFile         = "server-key.pem"
	DefaultCertDir  = "/tmp/k8s-webhook-server/serving-certs"
	FunctionCRDName = "functions.serverless.kyma-project.io"
)
View Source
const (
	MutatingWebhook   WebHookType = "Mutating"
	ValidatingWebHook WebHookType = "Validating"

	DefaultingWebhookName = "defaulting.webhook.serverless.kyma-project.io"
	ValidationWebhookName = "validation.webhook.serverless.kyma-project.io"

	FunctionDefaultingWebhookPath       = "/defaulting/functions"
	RegistryConfigDefaultingWebhookPath = "/defaulting/registry-config-secrets"
	FunctionValidationWebhookPath       = "/validation/function"
)
View Source
const TimeToExpire = 10 * 24 * time.Hour

Variables

This section is empty.

Functions

func InjectCABundleIntoWebhooks

func InjectCABundleIntoWebhooks(ctx context.Context, client ctlrclient.Client, config WebhookConfig, wt WebHookType) error

func SetupResourcesController

func SetupResourcesController(ctx context.Context, mgr ctrl.Manager, serviceName, serviceNamespace, secretName string, log *zap.SugaredLogger) error

Types

type Result

type Result int
const (
	NoResult Result = iota
	Updated  Result = iota
)

func EnsureWebhookSecret

func EnsureWebhookSecret(ctx context.Context, client ctrlclient.Client, secretName, secretNamespace, serviceName string, log *zap.SugaredLogger) (Result, error)

func SetupCertificates

func SetupCertificates(ctx context.Context, secretName, secretNamespace, serviceName string, logger *zap.SugaredLogger) (Result, error)

type WebHookType

type WebHookType string

type WebhookConfig

type WebhookConfig struct {
	CABundle         []byte
	ServiceName      string
	ServiceNamespace string
}

Jump to

Keyboard shortcuts

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