cert

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 29 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertOption

type CertOption struct {
	// CAName will be used as CommonName of CA cert
	CAName string
	// Organizations for certs
	Organizations []string
	// Hosts for server cert
	Hosts []string
	// CommonName for server cert
	CommonName string
	// RSA key size, default: 2048
	RSAKeySize int
	// cert dir to mount secret
	CertDir string
	// cert will be expired after this duration, default: 100 years
	CertValidityDuration time.Duration
	// Deprecated: use Organizations instead
	CAOrganizations []string
	// Deprecated: user Hosts instead
	DNSNames []string

	SecretInfo SecretInfo
}

type SecretInfo

type SecretInfo struct {
	Name      string
	Namespace string
	// contains filtered or unexported fields
}

type WebhookCert

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

func NewWebhookCert

func NewWebhookCert(certOpt CertOption, webhooks []WebhookInfo, kubeclient kubernetes.Interface, dyclient dynamic.Interface) *WebhookCert

func (*WebhookCert) CheckServerCertValid added in v0.4.0

func (w *WebhookCert) CheckServerCertValid(ctx context.Context, addr string) error

func (*WebhookCert) CheckServerCertValidWithTimeout added in v0.5.0

func (w *WebhookCert) CheckServerCertValidWithTimeout(addr string, timeout time.Duration) error

func (*WebhookCert) CheckServerStarted added in v0.5.0

func (w *WebhookCert) CheckServerStarted(ctx context.Context, addr string) error

func (*WebhookCert) CheckServerStartedWithTimeout added in v0.5.0

func (w *WebhookCert) CheckServerStartedWithTimeout(addr string, timeout time.Duration) error

func (*WebhookCert) EnsureCertReady

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

func (*WebhookCert) WatchAndEnsureWebhooksCA added in v0.4.0

func (w *WebhookCert) WatchAndEnsureWebhooksCA(ctx context.Context) error

type WebhookInfo

type WebhookInfo struct {
	Type WebhookType
	Name string
}

type WebhookType

type WebhookType string
const (
	ValidatingV1      WebhookType = "ValidatingV1"
	ValidatingV1Beta1 WebhookType = "ValidatingV1Beta1"
	MutatingV1        WebhookType = "MutatingV1"
	MutatingV1Beta1   WebhookType = "MutatingV1Beta1"
)

Jump to

Keyboard shortcuts

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