Help us shape the future of Go! Take the 2026 Go Developer Survey

chartrenderer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersionSet

func GetVersionSet(client discovery.ServerGroupsInterface) (chartutil.VersionSet, error)

GetVersionSet retrieves a set of available k8s API versions.

Types

type ChartRenderer

type ChartRenderer interface {
	Render(chartPath, releaseName, namespace string, values map[string]interface{}) (*RenderedChart, error)
}

ChartRenderer is an interface for rendering Helm Charts from path, name, namespace and values.

func New

New creates a new DefaultChartRenderer object. It requires a Kubernetes client as input which will be injected in the Tiller environment.

type DefaultChartRenderer

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

DefaultChartRenderer is a struct which contains the chart render engine and a Kubernetes client. The chart render is used to render the Helm charts into a RenderedChart struct from which the resulting manifest can be generated.

func (*DefaultChartRenderer) Render

func (r *DefaultChartRenderer) Render(chartPath, releaseName, namespace string, values map[string]interface{}) (*RenderedChart, error)

Render loads the chart from the given location <chartPath> and calls the Render() function to convert it into a ChartRelease object.

type RenderedChart

type RenderedChart struct {
	ChartName string
	Files     map[string]string
}

RenderedChart holds a map of rendered templates file with template file name as key and rendered template as value.

func (*RenderedChart) FileContent

func (c *RenderedChart) FileContent(filename string) string

FileContent returns explicitly the content of the provided <filename>.

func (*RenderedChart) Manifest

func (c *RenderedChart) Manifest() []byte

Manifest returns the manifest of the rendered chart as byte array.

func (*RenderedChart) ManifestAsString

func (c *RenderedChart) ManifestAsString() string

ManifestAsString returns the manifest of the rendered chart as string.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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