Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultSesameServiceName holds the default service name // used for the Sesame Kubernetes service. This value is added // to the Sesame certificate's Subject Alt Names. DefaultSesameServiceName = "sesame" // DefaultEnvoyServiceName holds the default service name // used for the Envoy Kubernetes service. This value is added // to the Envoy certificate's Subject Alt Names. DefaultEnvoyServiceName = "envoy" // DefaultCertificateLifetime holds the default certificate lifetime // (in days). DefaultCertificateLifetime = 365 // DefaultNamespace where Sesame is deployed. This value is added // to the certificates Subject Alt Names. DefaultNamespace = "projectsesame" // DefaultDNSName holds the Kubernetes local dns suffix name // specific to the cluster where Sesame is deployed and is used when // configuring Subject Alt Names on the certificates. DefaultDNSName = "cluster.local" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificates ¶
type Certificates struct { CACertificate []byte SesameCertificate []byte SesamePrivateKey []byte EnvoyCertificate []byte EnvoyPrivateKey []byte }
Certificates contains a set of Certificates as []byte each holding the CA Cert along with with Sesame & Envoy Certs.
func GenerateCerts ¶
func GenerateCerts(config *Configuration) (*Certificates, error)
GenerateCerts generates a CA Certificate along with certificates for Sesame & Envoy returning them as a *Certificates struct or error if encountered.
type Configuration ¶
type Configuration struct { // Lifetime is the number of days for which certificates will be valid. Lifetime uint // Namespace is the Kubernetes namespace name to add to the generated // certificates Subject Alternate Name values. Namespace string // DNSName holds the Kubernetes local dns suffix name // specific to the cluster where Sesame is deployed and is used when // configuring Subject Alt Names on the certificates. DNSName string // SesameServiceName holds the name of the Sesame service name. SesameServiceName string // EnvoyServiceName holds the name of the Envoy service name. EnvoyServiceName string }
Configuration holds config parameters used for generating certificates.
Click to show internal directories.
Click to hide internal directories.