getter

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDeprecatedTLSConfig = errors.New("TLS configured in a deprecated manner")

Functions

func GetterOptionsFromSecret added in v1.1.0

func GetterOptionsFromSecret(secret corev1.Secret) ([]getter.Option, error)

GetterOptionsFromSecret constructs a getter.Option slice for the given secret. It returns the slice, or an error.

Types

type ClientOpts added in v1.1.0

type ClientOpts struct {
	Authenticator authn.Authenticator
	Keychain      authn.Keychain
	RegLoginOpts  []helmreg.LoginOption
	TlsConfig     *tls.Config
	GetterOpts    []helmgetter.Option
	Insecure      bool
}

ClientOpts contains the various options to use while constructing a Helm repository client.

func GetClientOpts added in v1.1.0

func GetClientOpts(ctx context.Context, c client.Client, obj *sourcev1.HelmRepository, url string) (*ClientOpts, string, error)

GetClientOpts uses the provided HelmRepository object and a normalized URL to construct a HelmClientOpts object. If obj is an OCI HelmRepository, then the returned options object will also contain the required registry auth mechanisms. A temporary directory is created to store the certs files if needed and its path is returned along with the options object. It is the caller's responsibility to clean up the directory.

func (ClientOpts) MustLoginToRegistry added in v1.1.0

func (o ClientOpts) MustLoginToRegistry() bool

MustLoginToRegistry returns true if the client options contain at least one registry login option.

Jump to

Keyboard shortcuts

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