util

package
v3.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: EPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeCertificate

func DecodeCertificate(data []byte) (*x509.Certificate, error)

func GenerateSecret

func GenerateSecret(name string, subject string, hosts string, expiration time.Duration, ca *corev1.Secret) corev1.Secret

GenerateSecret generates a kubernetes secret. name is the corev1.Secret's name. subject is the x509 certificate's common name. hosts are the host names in the x509 certificate. Comma separated if more than one hostname expiration is when the secret expires, if zero is passed in, the expiration is set to 5 years from now ca is the certificate authority, if nil a ca cert will be created.

Types

type CertificateAuthority

type CertificateAuthority struct {
	Certificate *x509.Certificate
	Key         interface{}
	CrtData     []byte
}

type CertificateData

type CertificateData map[string][]byte

Jump to

Keyboard shortcuts

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