registry

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthAdaptHelper added in v0.31.0

func AuthAdaptHelper(auth authn.Authenticator) (registry.LoginOption, error)

AuthAdaptHelper returns an ORAS credentials callback configured with the authorization data from the given authn authenticator. This allows for example to make use of credential helpers from cloud providers. Ref: https://github.com/google/go-containerregistry/tree/main/pkg/authn

func ClientGenerator

func ClientGenerator(tlsConfig *tls.Config, isLogin, insecureHTTP bool) (*registry.Client, string, error)

ClientGenerator generates a registry client and a temporary credential file. The client is meant to be used for a single reconciliation. The file is meant to be used for a single reconciliation and deleted after.

func KeychainAdaptHelper added in v0.31.0

func KeychainAdaptHelper(keyChain authn.Keychain) func(string) (registry.LoginOption, error)

KeyChainAdaptHelper returns an ORAS credentials callback configured with the authorization data from the given authn keychain. This allows for example to make use of credential helpers from cloud providers. Ref: https://github.com/google/go-containerregistry/tree/main/pkg/authn

func LoginOptionFromSecret

func LoginOptionFromSecret(registryURL string, secret corev1.Secret) (authn.Keychain, error)

LoginOptionFromSecret derives authentication data from a Secret to login to an OCI registry. This Secret may either hold "username" and "password" fields or be of the corev1.SecretTypeDockerConfigJson type and hold a corev1.DockerConfigJsonKey field with a complete Docker configuration. If both, "username" and "password" are empty, a nil LoginOption and a nil error will be returned.

func NewLoginOption added in v1.1.0

func NewLoginOption(auth authn.Authenticator, keychain authn.Keychain, registryURL string) (registry.LoginOption, error)

NewLoginOption returns a registry login option for the given HelmRepository. If the HelmRepository does not specify a secretRef, a nil login option is returned.

func TLSLoginOption added in v1.1.0

func TLSLoginOption(certFile, keyFile, caFile string) registry.LoginOption

TLSLoginOption returns a LoginOption that can be used to configure the TLS client. It requires either the caFile or both certFile and keyFile to be not blank.

Types

This section is empty.

Jump to

Keyboard shortcuts

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