Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildHTTPClient ¶
func BuildHTTPClient(cpw *CertPoolWatcher) (*http.Client, error)
func LogCertificateVerificationError ¶
This function unwraps the given error to find an CertificateVerificationError. It then logs the list of certificates found in the unwrapped error Returns: * true if a CertificateVerificationError is found * false if no CertificateVerificationError is found
func LogDockerCertificates ¶
Log the certificates that would be used for docker pull operations Assumes a /etc/docker/certs.d like path, where the directory contains <hostname>:<port> directories in which a CA certificate (generally named "ca.crt") is located.
Types ¶
type CertPoolWatcher ¶
type CertPoolWatcher struct {
// contains filtered or unexported fields
}
func NewCertPoolWatcher ¶
func NewCertPoolWatcher(caDir string, log logr.Logger) (*CertPoolWatcher, error)
func (*CertPoolWatcher) Done ¶
func (cpw *CertPoolWatcher) Done()
Indicate that you're done with the CertPoolWatcher so it can terminate the watcher go func
func (*CertPoolWatcher) Get ¶
func (cpw *CertPoolWatcher) Get() (*x509.CertPool, int, error)
Returns the current CertPool and the generation number
func (*CertPoolWatcher) Restart ¶ added in v1.6.0
func (cpw *CertPoolWatcher) Restart(f func(int))
Change the restart behavior