ctlrhelper

package module
v0.4.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	// required
	Namespace string
	// required
	SecretName string
	// required
	ServiceName string
	// required
	CertDir string
	// required
	WebhookServerPort int

	DnsName       string
	Organizations []string
	Hosts         []string

	Webhooks                     []cert.WebhookInfo
	TimeoutForEnsureCertReady    time.Duration
	TimeoutForCheckServerStarted time.Duration
	TimeoutForCheckServerCert    time.Duration

	KubeClient    kubernetes.Interface
	DynamicClient dynamic.Interface
}

func (*Option) ValidateAndFillDefaultValues

func (o *Option) ValidateAndFillDefaultValues() error

type WebhookHelper

type WebhookHelper struct {
	// contains filtered or unexported fields
}

func NewNewWebhookHelper deprecated

func NewNewWebhookHelper(opt Option) (*WebhookHelper, error)

Deprecated: use NewWebhookHelper instead

func NewNewWebhookHelperOrDie deprecated

func NewNewWebhookHelperOrDie(opt Option) *WebhookHelper

Deprecated: use NewWebhookHelperOrDie instead

func NewWebhookHelper added in v0.3.0

func NewWebhookHelper(opt Option) (*WebhookHelper, error)

func NewWebhookHelperOrDie

func NewWebhookHelperOrDie(opt Option) *WebhookHelper

func (*WebhookHelper) EnsureCert

func (w *WebhookHelper) EnsureCert(ctx context.Context) error

EnsureCert ensure cert exist and webhook patched it will block util successes or failed

func (*WebhookHelper) EnsureCertReady added in v0.2.0

func (w *WebhookHelper) EnsureCertReady(ctx context.Context) error

EnsureCertReady ensure cert exist and mounted and webhook patched it will block util successes or failed

func (*WebhookHelper) Setup

func (w *WebhookHelper) Setup(ctx context.Context, mgr manager.Manager, registry func(*webhook.Server), errC chan<- error)

Setup is a non-block method * ensure cert exist and mounted * setup healthz and readyz * registry webhooks

Jump to

Keyboard shortcuts

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