Documentation
¶
Overview ¶
NOTE: This package originates from controller-runtime v0.1. The later versions of controller-runtime removed support for self signed certificate generation for webhook configuration. The package has been updated to support the new kubernetes APIs and controller-runtime.
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" // ServerCertName is the name of the serving certificate ServerCertName = "cert.pem" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertWriter ¶
type CertWriter interface {
// EnsureCert provisions the cert for the webhookClientConfig.
EnsureCert(ctx context.Context, dnsName string) (*generator.Artifacts, bool, error)
// Inject injects the necessary information given the objects.
// It supports MutatingWebhookConfiguration and
// ValidatingWebhookConfiguration.
Inject(ctx context.Context, objs ...client.Object) error
}
CertWriter provides method to handle webhooks.
func NewSecretCertWriter ¶
func NewSecretCertWriter(ops SecretCertWriterOptions) (CertWriter, error)
NewSecretCertWriter constructs a CertWriter that persists the certificate in a k8s secret.
type SecretCertWriterOptions ¶
type SecretCertWriterOptions struct {
// client talks to a kubernetes cluster for creating the secret.
Client client.Client
// 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.