resources

package
v0.0.0-...-b55b570 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 15 Imported by: 35 modules, 78 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// ServerKey is the name of the key associated with the secret's private key.
	ServerKey = "server-key.pem"
	// ServerCert is the name of the key associated with the secret's public key.
	ServerCert = "server-cert.pem"
	// CACert is the name of the key associated with the certificate of the CA for
	// the keypair.
	CACert = "ca-cert.pem"
)

Variables

View Source
var MakeSecret = MakeSecretInternal

MakeSecret synthesizes a Kubernetes Secret object with the keys specified by ServerKey, ServerCert, and CACert populated with a fresh certificate. This is mutable to make deterministic testing possible.

Functions

func CreateCerts

func CreateCerts(ctx context.Context, name, namespace string, notAfter time.Time) (serverKey, serverCert, caCert []byte, err error)

CreateCerts creates and returns a CA certificate and certificate and key for the server. serverKey and serverCert are used by the server to establish trust for clients, CA certificate is used by the client to verify the server authentication chain. notAfter specifies the expiration date.

func MakeSecretInternal

func MakeSecretInternal(ctx context.Context, name, namespace, serviceName string) (*corev1.Secret, error)

MakeSecretInternal is only public so MakeSecret can be restored in testing. Use MakeSecret.

Types

This section is empty.

Jump to

Keyboard shortcuts

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