Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertConfig ¶
type CertConfig struct {
// DNS names
DNSNames []string
// IP Addresses
IPAddresses []net.IP
// CommonName is the certificate common name
CommonName string
// CertOptions for location and organization information surrounding the certificate
CertOptions
// NotBefore time when certificate is valid
NotBefore time.Time
// NotAfter time when certificate is valid
NotAfter time.Time
// AltNames has the list of alternative names
AltNames map[string]string
}
CertConfig specifies the certificate configuration
type CertLocation ¶
type CertLocation struct {
// Directory is the directory where the cert files will be written
Directory string
// RootCertFilename is the root cert filename
RootCertFilename string
// RootPrivateKeyFilename is the root private key filename
RootPrivateKeyFilename string
// LeafCertFilename is the leaf cert filename
LeafCertFilename string
// LeafPrivateKeyFilename is the leaf private key filename
LeafPrivateKeyFilename string
}
CertLocation specifies the on disk locations of the certs
type CertOptions ¶
CertOptions contains the country, state, org, and orgUnit information of a certificate
type CertPairWithPem ¶
type CertPairWithPem struct {
// The certificate chain in PEM format. This contains the leaf cert followed
// by the root cert
CertChainPEM []byte
// The leaf cert results
LeafCertResult *CertResult
// The root cert results
RootCertResult *CertResult
}
CertPairWithPem contains certificates and chain in PEM format
func CreateAndPersistKubernetesCerts ¶
func CreateAndPersistKubernetesCerts(kubeApiServerIP string, serviceSubnets []string, outdir string, options CertOptions) (*CertPairWithPem, error)
CreateAndPersistKubernetesCerts creates and persists the cert used by Kubernetes in an OCNE cluster The certs are written to the output directory and filenames specified in CertLocation
func CreateHeadlampCerts ¶
func CreateHeadlampCerts(uiHost string) (*CertPairWithPem, error)
CreateHeadlampCerts creates the certs used by Headlamp when running in an OCNE Kubernetes cluster
type CertResult ¶
type CertResult struct {
PrivateKey *rsa.PrivateKey
PrivateKeyPEM []byte
Cert *x509.Certificate
CertPEM []byte
}
CertResult contains the generated cert results
Click to show internal directories.
Click to hide internal directories.