Documentation ¶
Index ¶
- Constants
- func AuthFromSecret(secret corev1.Secret, ref name.Reference) (authn.Authenticator, error)
- func Fuzz_imagerepository_getURLHost(f *testing.F)
- func TransportFromKubeTLSSecret(certSecret *corev1.Secret) (*http.Transport, error)
- func TransportFromSecret(certSecret *corev1.Secret) (*http.Transport, error)
Constants ¶
const ( ClientCert = "certFile" ClientKey = "keyFile" CACert = "caFile" CACrtKey = "ca.crt" )
Variables ¶
This section is empty.
Functions ¶
func AuthFromSecret ¶
authFromSecret creates an Authenticator that can be given to the `remote` funcs, from a Kubernetes secret. If the secret doesn't have the right format or data, it returns an error.
func TransportFromKubeTLSSecret ¶ added in v0.30.0
TransportFromKubeTLSSecret reads the TLS data specified in the provided Secret and returns a transport configured with the appropriate TLS settings. It checks for the following keys in the Secret: - `ca.crt`, for the CA certificate - `tls.crt` and `tls.key`, for the certificate and private key
If none of these keys exists in the Secret then an empty transport is returned. If only a certificate OR private key is found, an error is returned.
func TransportFromSecret ¶
TransportFromSecret reads the TLS data specified in the provided Secret and returns a transport configured with the appropriate TLS settings. It checks for the following keys in the Secret: - `caFile`, for the CA certificate - `certFile` and `keyFile`, for the certificate and private key
If none of these keys exists in the Secret then an empty transport is returned. If only a certificate OR private key is found, an error is returned.
Types ¶
This section is empty.