tls

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider is used to provide a tls config containing an automatically renewed private key and certificate. The provider will continue to renew the signed certificate and private in the background, while consumers can transparently use an exposed TLS config. Consumers *MUST* using this config as is, in order for the certificate and private key be renewed transparently.

func NewProvider

func NewProvider(ctx context.Context, log logr.Logger, tlsOptions *options.TLSOptions,
	kubeOptions *options.KubeOptions, cmOptions *options.CertManagerOptions,
	readyz *healthz.Check) (*Provider, error)

NewProvider will return a new provider where a TLS config is ready to be fetched.

func (*Provider) RootCA

func (p *Provider) RootCA() []byte

RootCA returns the configured CA certificate

func (*Provider) TLSConfig

func (p *Provider) TLSConfig() (*tls.Config, error)

TLSConfig should be used by consumers of the provider to get a TLS config which will have the signed certificate and private key appropriately renewed

Jump to

Keyboard shortcuts

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