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 ¶
Click to show internal directories.
Click to hide internal directories.