Documentation ¶
Overview ¶
Package repo implements the Hypper Chart Repository. A chart repository is an HTTP server that provides information on charts. A local repository cache is an on-disk representation of a chart repository. There are two important file formats for chart repositories. The first is the 'index.yaml' format, which is expressed like this:
apiVersion: v1 entries: frobnitz: - created: 2016-09-29T12:14:34.830161306-06:00 description: This is a frobnitz. digest: 587bd19a9bd9d2bc4a6d25ab91c8c8e7042c47b4ac246e37bf8e1e74386190f4 home: http://example.com keywords: - frobnitz - sprocket - dodad maintainers: - email: Hypper@example.com name: The Hypper Team - email: nobody@example.com name: Someone Else name: frobnitz urls: - http://example-charts.com/testdata/repository/frobnitz-1.2.3.tgz version: 1.2.3 sprocket: - created: 2016-09-29T12:14:34.830507606-06:00 description: This is a sprocket" digest: 8505ff813c39502cc849a38e1e4a8ac24b8e6e1dcea88f4c34ad9b7439685ae6 home: http://example.com keywords: - frobnitz - sprocket - dodad maintainers: - email: Hypper@example.com name: The Hypper Team - email: nobody@example.com name: Someone Else name: sprocket urls: - http://example-charts.com/testdata/repository/sprocket-1.2.0.tgz version: 1.2.0 generated: 2016-09-29T12:14:34.829721375-06:00
An index.yaml file contains the necessary descriptive information about what charts are available in a repository, and how to get them. The second file format is the repositories.yaml file format. This file is for facilitating local cached copies of one or more chart repositories. The format of a repository.yaml file is:
apiVersion: v1 generated: TIMESTAMP repositories: - name: stable url: http://example.com/charts cache: stable-index.yaml - name: incubator url: http://example.com/incubator cache: incubator-index.yaml
This file maps three bits of information about a repository:
- The name the user uses to refer to it
- The fully qualified URL to the repository (index.yaml will be appended)
- The name of the local cachefile
Index ¶
Constants ¶
const APIVersionV1 = "v1"
APIVersionV1 is the v1 API version for index and repository files.
Variables ¶
var ( // ErrNoAPIVersion indicates that an API version was not specified. ErrNoAPIVersion = errors.New("no API version specified") // ErrNoChartVersion indicates that a chart with the given version is not found. ErrNoChartVersion = errors.New("no chart version found") // ErrNoChartName indicates that a chart with the given name is not found. ErrNoChartName = errors.New("no chart name found") )
Functions ¶
This section is empty.
Types ¶
type ChartRepository ¶
type ChartRepository struct {
helmRepo.ChartRepository
}
ChartRepository represents a chart repository
ChartRepository is a composite type of Helm's repo.ChartRepository
func NewChartRepository ¶
NewChartRepository constructs ChartRepository
type ChartVersions ¶
type ChartVersions struct {
ChartVersions []*helmRepo.ChartVersion
}
ChartVersions is a list of versioned chart references. Implements a sorter on Version.
This is a composition for helms `type ChartVersions []*ChartVersion`
type File ¶
File represents the repositories.yaml file
File is a composite type of helm/pkg/repo.File
type IndexFile ¶
IndexFile represents the index file in a chart repository
This is a composite type of helm's Indexfile
func IndexDirectory ¶
IndexDirectory reads a (flat) directory and generates an index.
It indexes only charts that have been packaged (*.tgz).
The index returned will be in an unsorted state
func LoadIndexFile ¶
LoadIndexFile takes a file at the given path and returns an IndexFile object