chartrenderer

package
v0.0.0-...-be4dc66 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartRenderer

type ChartRenderer interface {
	Render(chartPath, releaseName, namespace string, values map[string]interface{}) (*RenderedChart, error)
	RenderArchive(archive []byte, 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

func New(client kubernetes.Interface) (ChartRenderer, error)

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.

func (*DefaultChartRenderer) RenderArchive

func (r *DefaultChartRenderer) RenderArchive(archive []byte, releaseName, namespace string, values map[string]interface{}) (*RenderedChart, error)

RenderArchive 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