secret

package
v0.31.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientCert = "certFile"
	ClientKey  = "keyFile"
	CACert     = "caFile"
	CACrtKey   = "ca.crt"
)

Variables

This section is empty.

Functions

func AuthFromSecret

func AuthFromSecret(secret corev1.Secret, ref name.Reference) (authn.Authenticator, error)

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 Fuzz_imagerepository_getURLHost

func Fuzz_imagerepository_getURLHost(f *testing.F)

func TransportFromKubeTLSSecret added in v0.30.0

func TransportFromKubeTLSSecret(certSecret *corev1.Secret) (*http.Transport, error)

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

func TransportFromSecret(certSecret *corev1.Secret) (*http.Transport, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL