registry

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveChartPackage

func SaveChartPackage(ch *chart.Chart, dir string) (string, error)

Types

type Client

type Client struct {

	// TargetDir is the location where the downloaded chart is saved
	TargetDir string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(l logr.InfoLogger, registries map[string]*Config, opts ...Option) (*Client, error)

NewClient is the constructor for the registry client

func (*Client) PullChart

func (c *Client) PullChart(l logr.Logger, repoKey, repoPath, chartName, version string) (string, *chart.Chart, error)

func (*Client) PushChart

func (c *Client) PushChart(l logr.Logger, repoKey, pkgPath string, ch *chart.Chart) error

PushChart pushes the chart to the repository specified by the repoKey. The repository setting is fetched from the associated registry config file

type Config

type Config struct {
	URL      string `yaml:"url" json:"url,omitempty"`
	Username string `yaml:"username" json:"username,omitempty"`
	Password string `yaml:"password" json:"password,omitempty"`

	AuthHeader         string `yaml:"authHeader" json:"auth_header,omitempty"`
	CaFile             string `yaml:"caFile" json:"ca_file,omitempty"`
	CertFile           string `yaml:"certFile" json:"cert_file,omitempty"`
	KeyFile            string `yaml:"keyFile" json:"key_file,omitempty"`
	InsecureSkipVerify bool   `yaml:"insecureSkipVerify" json:"insecure_skip_verify,omitempty"`

	AccessToken string `yaml:"accessToken" json:"access_token,omitempty"`
}

Config struct captures the configuration fields as per the repoAddOptions - https://github.com/helm/helm/blob/v3.1.2/cmd/helm/repo_add.go#L39

type Option

type Option func(c *Client)

func TargetDir

func TargetDir(d string) Option

type PullOption

type PullOption func(p *action.Pull)

type RegistryMap

type RegistryMap map[string]*Config //nolint:golint

RegistryMap specifies a type alias for the registry configuration by repo key

func (RegistryMap) RegistryConfig

func (rm RegistryMap) RegistryConfig(key string) (*Config, error)

Jump to

Keyboard shortcuts

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