Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CAKeyName is the name of the CA private key CAKeyName = "ca-key.pem" // CACertName is the name of the CA certificate CACertName = "ca-cert.pem" // ServerKeyName is the name of the server private key ServerKeyName = "key.pem" ServerKeyName2 = "tls.key" // ServerCertName is the name of the serving certificate ServerCertName = "cert.pem" ServerCertName2 = "tls.crt" )
View Source
const ( ExternalCertWriter = "external" ExternalCACert = "ca.crt" ExternalCAKey = "ca.key" ExternalServerCert = "tls.crt" ExternalServerKey = "tls.key" )
View Source
const (
FsCertWriter = "fs"
)
View Source
const (
SecretCertWriter = "secret"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CertWriter ¶
type CertWriter interface { // EnsureCert provisions the cert for the webhookClientConfig. EnsureCert(dnsName string) (*generator.Artifacts, bool, error) }
CertWriter provides method to handle webhooks.
func NewExternalCertWriter ¶ added in v1.7.0
func NewExternalCertWriter(ops ExternalCertWriterOptions) (CertWriter, error)
NewExternalCertWriter constructs a CertWriter that persists the certificate in a k8s secret.
func NewFSCertWriter ¶
func NewFSCertWriter(ops FSCertWriterOptions) (CertWriter, error)
NewFSCertWriter constructs a CertWriter that persists the certificate on filesystem.
func NewSecretCertWriter ¶
func NewSecretCertWriter(ops SecretCertWriterOptions) (CertWriter, error)
NewSecretCertWriter constructs a CertWriter that persists the certificate in a k8s secret.
type ExternalCertWriterOptions ¶ added in v1.7.0
type ExternalCertWriterOptions struct { // client talks to a kubernetes cluster for creating the secret. Clientset clientset.Interface // secret points the secret that contains certificates that written by the CertWriter. Secret *types.NamespacedName }
ExternalCertWriterOptions is options for constructing a externalCertWriter.
type FSCertWriterOptions ¶
type FSCertWriterOptions struct { // certGenerator generates the certificates. CertGenerator generator.CertGenerator // path is the directory that the certificate and private key and CA certificate will be written. Path string }
FSCertWriterOptions are options for constructing a FSCertWriter.
type SecretCertWriterOptions ¶
type SecretCertWriterOptions struct { // client talks to a kubernetes cluster for creating the secret. Clientset clientset.Interface // certGenerator generates the certificates. CertGenerator generator.CertGenerator // secret points the secret that contains certificates that written by the CertWriter. Secret *types.NamespacedName }
SecretCertWriterOptions is options for constructing a secretCertWriter.
Click to show internal directories.
Click to hide internal directories.