helm

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LatestChartVersion

func LatestChartVersion(a app.App, repoName, chartName string) (string, error)

LatestChartVersion finds the latest vendored version of a chart.

Types

type CachingClient added in v0.13.0

type CachingClient struct {
	RepositoryClient
	// contains filtered or unexported fields
}

CachingClient is a caching wrapper over a Helm HTTP client

func NewCachingClient added in v0.13.0

func NewCachingClient(c RepositoryClient) *CachingClient

func (*CachingClient) Chart added in v0.13.0

func (c *CachingClient) Chart(name, version string) (*RepositoryChart, error)

Chart returns a Chart with a given name and version. If the version is blank, it returns the latest version.

type Getter

type Getter interface {
	Get(string) (*http.Response, error)
}

type HTTPClient

type HTTPClient struct {
	// contains filtered or unexported fields
}

HTTPClient is a HTTP Helm repository client.

func NewHTTPClient

func NewHTTPClient(urlStr string, hg Getter) (*HTTPClient, error)

NewHTTPClient creates an instance of HTTPClient

func (*HTTPClient) Chart

func (hrc *HTTPClient) Chart(name, version string) (*RepositoryChart, error)

Chart returns a chart from the repository. If version is blank, it returns the latest.

func (*HTTPClient) Fetch

func (hrc *HTTPClient) Fetch(uri string) (io.ReadCloser, error)

Fetch fetches URLs from a repository. If uri is a path, it will use the client URL as the base.

func (*HTTPClient) Repository

func (hrc *HTTPClient) Repository() (*Repository, error)

Repository returns the Helm repository's content.

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer renders helm charts.

func NewRenderer

func NewRenderer(a app.App, envName string) *Renderer

NewRenderer creates an instance of Renderer.

func (*Renderer) JsonnetNativeFunc

func (r *Renderer) JsonnetNativeFunc() *jsonnet.NativeFunction

JsonnetNativeFunc is a jsonnet native function that renders helm charts.

func (*Renderer) Render

func (r *Renderer) Render(repoName, chartName, chartVersion, componentName string, values map[string]interface{}) ([]interface{}, error)

Render renders a Helm chart.

type Repository

type Repository struct {
	Charts map[string][]RepositoryChart `json:"entries,omitempty"`
}

Repository is metadata describing the contents of a Helm repository.

func (*Repository) Latest

func (hr *Repository) Latest() []RepositoryChart

Latest returns the latest version of charts in a Helm repository.

type RepositoryChart

type RepositoryChart struct {
	Description string   `json:"description,omitempty"`
	Name        string   `json:"name,omitempty"`
	URLs        []string `json:"urls,omitempty"`
	Version     string   `json:"version,omitempty"`
}

RepositoryChart is metadata describing a Helm Chart in a repository.

type RepositoryCharts

type RepositoryCharts []RepositoryChart

RepositoryCharts is a slice of RepositoryChart.

func (RepositoryCharts) Len

func (rc RepositoryCharts) Len() int

func (RepositoryCharts) Less

func (rc RepositoryCharts) Less(i, j int) bool

func (RepositoryCharts) Swap

func (rc RepositoryCharts) Swap(i, j int)

type RepositoryClient

type RepositoryClient interface {
	// Repository returns the contents of a Helm repository.
	Repository() (*Repository, error)
	// Chart returns a Chart with a given name and version. If the version is blank, it returns
	// the latest version.
	Chart(name, version string) (*RepositoryChart, error)
	// Fetch fetches URIs for a chart.
	Fetch(uri string) (io.ReadCloser, error)
}

RepositoryClient is a client for retrieving Helm repository contents. The structure is loosely documented at https://github.com/kubernetes/helm/blob/master/docs/chart_repository.md.

Directories

Path Synopsis
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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