Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultContourServiceName holds the default service name // used for the Contour Kubernetes service. This value is added // to the Contour certificate's Subject Alt Names. DefaultContourServiceName = "contour" // 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 Contour is deployed. This value is added // to the certificates Subject Alt Names. DefaultNamespace = "projectcontour" // DefaultDNSName holds the Kubernetes local dns suffix name // specific to the cluster where Contour 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
ContourCertificate []byte
ContourPrivateKey []byte
EnvoyCertificate []byte
EnvoyPrivateKey []byte
}
Certificates contains a set of Certificates as []byte each holding the CA Cert along with with Contour & Envoy Certs.
func GenerateCerts ¶
func GenerateCerts(config *Configuration) (*Certificates, error)
GenerateCerts generates a CA Certificate along with certificates for Contour & 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 Contour is deployed and is used when
// configuring Subject Alt Names on the certificates.
DNSName string
// ContourServiceName holds the name of the Contour service name.
ContourServiceName 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.