Documentation ¶
Index ¶
Constants ¶
const (
FieldTag = "helm"
)
Variables ¶
var (
// KubeVersion is the target version of the kubernetes.
KubeVersion = "v1.20.0"
)
Functions ¶
This section is empty.
Types ¶
type LoadOptions ¶
type LoadOptions struct { // ReleaseName is the name of the release. ReleaseName string // Namespace is the namespace of the release. Namespace string // ChartName is the name of the chart. ChartName string // ChartVersion is the version of the chart. ChartVersion string // FromCNRegion indicates whether to use the artifacts from CN region. FromCNRegion bool // ValuesOptions is the options for generating the helm values. ValuesOptions interface{} // ValuesFile is the path to the values file. ValuesFile string // EnableCache indicates whether to enable the cache. EnableCache bool }
LoadOptions is the options for running LoadAndRenderChart.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is the Helm charts loader. The implementation is based on Helm SDK. The main purpose of Loader is: 1. Load the chart from remote charts and save them in cache directory. 2. Generate the manifests from the chart with the values.
func (*Loader) LoadAndRenderChart ¶
LoadAndRenderChart loads the chart from the remote charts and render the manifests with the values.
type Values ¶
type Values map[string]interface{}
Values is a map of helm values.
func NewFromFile ¶
NewFromFile creates a new Values from a local yaml values file.
func ToHelmValues ¶
ToHelmValues converts the input struct that contains special helm annotations `helm:"values"` and the local yaml values file to a map that can be used as helm values. If there is the same key in both the input struct and the local yaml values file, the value in the input struct will be used. valuesFile can be empty.
func (Values) OutputValues ¶
OutputValues returns the values as a yaml byte array.