Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TLSReadyReadinessProbe ¶
func TLSReadyReadinessProbe(webhook *Webhook) http.HandlerFunc
TLSReadyReadinessProbe defines a readiness check for a Webhook struct based on the presence of its TLS certificate and key. It requires the whole webhook as parameter to be able to RLock on the certificate for the presence confirmation.
Types ¶
type Webhook ¶
type Webhook struct { sync.RWMutex CertFile string KeyFile string Cert *tls.Certificate ClusterName string Logger *zap.SugaredLogger Server *http.Server CertWatcher *fsnotify.Watcher }
Webhook is a webhook server that can accept requests from the Apiserver
func (*Webhook) GetCert ¶
func (whsvr *Webhook) GetCert(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetCert returns the certificate that should be used by the server in the TLS handshake.
Click to show internal directories.
Click to hide internal directories.