tls

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCertManagerNotFound = errors.New("cert-manager not found")
	ErrCertManagerNotReady = errors.New("cert-manager not ready")
)

Functions

func CACertificateSecretName added in v1.15.0

func CACertificateSecretName(cr *api.PerconaServerMongoDB) string

func CertificateSecretName added in v1.15.0

func CertificateSecretName(cr *api.PerconaServerMongoDB, internal bool) string

func Config added in v1.10.0

func Config(ctx context.Context, k8sclient client.Client, cr *api.PerconaServerMongoDB) (tls.Config, error)

Config returns tls.Config to be used in mongo.Config

func GetCertificateSans added in v1.15.0

func GetCertificateSans(cr *api.PerconaServerMongoDB) []string

func IsSecretCreatedByUser added in v1.16.1

func IsSecretCreatedByUser(ctx context.Context, c client.Client, cr *api.PerconaServerMongoDB, secret *corev1.Secret) (bool, error)

func Issue

func Issue(hosts []string) (caCert []byte, tlsCert []byte, tlsKey []byte, err error)

Issue returns CA certificate, TLS certificate and TLS private key

func MergePEM added in v1.16.0

func MergePEM(target []byte, toMerge ...[]byte) ([]byte, error)

Types

type CertManagerController added in v1.15.0

type CertManagerController interface {
	ApplyIssuer(ctx context.Context, cr *api.PerconaServerMongoDB) (util.ApplyStatus, error)
	ApplyCAIssuer(ctx context.Context, cr *api.PerconaServerMongoDB) (util.ApplyStatus, error)
	ApplyCertificate(ctx context.Context, cr *api.PerconaServerMongoDB, internal bool) (util.ApplyStatus, error)
	ApplyCACertificate(ctx context.Context, cr *api.PerconaServerMongoDB) (util.ApplyStatus, error)
	DeleteDeprecatedIssuerIfExists(ctx context.Context, cr *api.PerconaServerMongoDB) error
	WaitForCerts(ctx context.Context, cr *api.PerconaServerMongoDB, secretsList ...string) error
	GetMergedCA(ctx context.Context, cr *api.PerconaServerMongoDB, secretNames []string) ([]byte, error)
	Check(ctx context.Context, config *rest.Config, ns string) error
	IsDryRun() bool
	GetClient() client.Client
}

func NewCertManagerController added in v1.15.0

func NewCertManagerController(cl client.Client, scheme *runtime.Scheme, dryRun bool) CertManagerController

type NewCertManagerControllerFunc added in v1.16.0

type NewCertManagerControllerFunc func(cl client.Client, scheme *runtime.Scheme, dryRun bool) CertManagerController

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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