Help us shape the future of Go! Take the 2026 Go Developer Survey

secret

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: Apache-2.0 Imports: 13 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 TLSConfigFromKubeTLSSecret added in v0.33.0

func TLSConfigFromKubeTLSSecret(certSecret *corev1.Secret) (*tls.Config, error)

TLSConfigFromKubeTLSSecret reads the TLS data specified in the provided Secret and returns a tls.Config 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 nil is returned. If only a certificate OR private key is found, an error is returned.

func TLSConfigFromSecret added in v0.33.0

func TLSConfigFromSecret(certSecret *corev1.Secret) (*tls.Config, error)

TLSConfigFromSecret reads the TLS data specified in the provided Secret and returns a tls.Config 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 nil 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