Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultBindAddress = ":4443" DefaultCACertPath = "/etc/ssl/certs/ca-certificates.crt" DefaultCertName = "tls.crt" DefaultKeyName = "tls.key" DefaultCertPath = "/tmp/est-server/serving-certs" )
View Source
const (
RequestIDContextKey = "requestID"
)
Variables ¶
View Source
var ( Error: errors.New("UnauthorizedESTClient"), Code: http.StatusUnauthorized, } NoCertificatesFoundError = ESTError{ Error: errors.New("NoCertificatesFound"), Code: http.StatusInternalServerError, } CertificateEncodingError = ESTError{ Error: errors.New("CertificateEncodingError"), Code: http.StatusInternalServerError, } CreateCSRFailedError = ESTError{ Error: errors.New("CreateCSRFailed"), Code: http.StatusInternalServerError, } CSRMismatchError = ESTError{ Error: errors.New("CSRMismatch"), Code: http.StatusBadRequest, } CertificateMismatchError = ESTError{ Error: errors.New("CertificateMismatch"), Code: http.StatusBadRequest, } NotReadyError = ESTError{ Code: http.StatusAccepted, } NoCertificateToRenewError = ESTError{ Error: errors.New("NoCertificateToRenew"), Code: http.StatusBadRequest, } )
Functions ¶
This section is empty.
Types ¶
type ESTServer ¶
type ESTServer struct {
Options Options
// contains filtered or unexported fields
}
ESTServer is the default implementation used for Server.
type Options ¶
type Options struct {
// Client is the client used to interact with the Kubernetes API.
// It is used to create and manage the CertificateSigningRequest (CSR) resources.
// It is required to be set.
// +kubebuilder:validation:Required
Client client.Client
// Scheme is the scheme used to decode the resources.
// It is required to be set.
// +kubebuilder:validation:Required
Scheme *runtime.Scheme
// BindAddress is the bind address for the server.
// If empty, the default is ":4443".
BindAddress string
// Logger is the logger used for the server.
Logger logr.Logger
// CertDir is the directory where the server will look for the TLS certificate and key.
// If empty, the default is "/etc/opt/cert-estuary/certs".
CertDir string
// CertName is the name of the TLS certificate file.
// If empty, the default is "tls.crt".
CertName string
// KeyName is the name of the TLS key file.
// If empty, the default is "tls.key".
KeyName string
// CACertPath is the path to the CA certificate file.
// If empty, the default is "/etc/ssl/certs/ca-certificates.crt".
CACertPath string
// TLSOpts is used to allow configuring the TLS config used for the server.
// this also allows providing a certificate via GetCertificate.
TLSOpts []func(*tls.Config)
// Metrics is the metrics used for the server.
Metrics *metrics.EstuaryMetrics
}
Click to show internal directories.
Click to hide internal directories.