Documentation ¶
Index ¶
Constants ¶
const (
// HelmChartsDir is the relative directory within a SDK project where Helm charts are stored.
HelmChartsDir = "helm-charts"
)
Variables ¶
This section is empty.
Functions ¶
func LoadChart ¶ added in v1.6.0
LoadChart creates a new helm chart for the project based on the passed opts. It returns a chart.Chart that references the newly created chart or an error.
If opts.Chart is a local file, it verifies that it is a valid helm chart archive and returns its chart.Chart representation.
If opts.Chart is a local directory, it verifies that it is a valid helm chart directory and returns its chart.Chart representation.
For any other value of opts.Chart, it attempts to fetch the helm chart from a remote repository.
If opts.Repo is not specified, the following chart reference formats are supported:
<repoName>/<chartName>: Fetch the helm chart named chartName from the helm chart repository named repoName, as specified in the $HELM_HOME/repositories/repositories.yaml file.
<url>: Fetch the helm chart archive at the specified URL.
If opts.Repo is specified, only one chart reference format is supported:
- <chartName>: Fetch the helm chart named chartName in the helm chart repository specified by opts.Repo
If opts.Version is not set, it will fetch the latest available version of the helm chart. Otherwise, it will fetch the specified version. opts.Version is not used when opts.Chart itself refers to a specific version, for example when it is a local path or a URL.
func NewChart ¶ added in v1.6.0
NewChart creates a new helm chart for the project from helm's default template. It returns a chart.Chart that references the newly created chart or an error.
func ScaffoldChart ¶ added in v1.6.0
ScaffoldChart scaffolds the provided chart.Chart to a known directory relative to projectDir
It also fetches the dependencies and reloads the chart.Chart ¶
It returns the reloaded chart, the relative path, or an error.
Types ¶
type Options ¶ added in v1.6.0
type Options struct { // Chart is a chart reference for a local or remote chart. Chart string // Repo is a URL to a custom chart repository. Repo string // Version is the version of the chart to fetch. Version string }
Options is used to configure how a Helm chart is scaffolded for a new Helm operator project.