Back to godoc.org
github.com/gardener/gardener/pkg/utils/chart

package chart

v1.5.1
Latest Go to latest
Published: May 27, 2020 | Licenses: Apache-2.0, BSD-2-Clause, MIT, MPL-2.0 | Module: github.com/gardener/gardener

Index

func CopyValues

func CopyValues(values map[string]interface{}) map[string]interface{}

CopyValues creates a shallow copy of the given Values.

func ImageMapToValues

func ImageMapToValues(m map[string]*imagevector.Image) map[string]interface{}

ImageMapToValues transforms the given image name to image mapping into chart Values.

func InjectImages

func InjectImages(values map[string]interface{}, v imagevector.ImageVector, names []string, opts ...imagevector.FindOptionFunc) (map[string]interface{}, error)

InjectImages finds the images with the given names and opts, makes a shallow copy of the given Values and injects a name to image string mapping at the `images` key of that map and returns it.

type Chart

type Chart struct {
	Name      string
	Path      string
	Images    []string
	Objects   []*Object
	SubCharts []*Chart
}

Chart represents a Helm chart (and its sub-charts) that can be applied and deleted.

func (*Chart) Apply

func (c *Chart) Apply(
	ctx context.Context,
	chartApplier gardenerkubernetes.ChartApplier,
	namespace string,
	imageVector imagevector.ImageVector,
	runtimeVersion, targetVersion string,
	additionalValues map[string]interface{},
) error

Apply applies this chart in the given namespace using the given ChartApplier. Before applying the chart, it collects its values, injecting images and merging the given values as needed.

func (*Chart) Delete

func (c *Chart) Delete(ctx context.Context, client client.Client, namespace string) error

Delete deletes this chart's objects from the given namespace using the given client.

func (*Chart) Render

func (c *Chart) Render(
	chartRenderer chartrenderer.Interface,
	namespace string,
	imageVector imagevector.ImageVector,
	runtimeVersion, targetVersion string,
	additionalValues map[string]interface{},
) (string, []byte, error)

Render renders this chart in the given namespace using the given chartRenderer. Before rendering the chart, it collects its values, injecting images and merging the given values as needed.

type Object

type Object struct {
	Type runtime.Object
	Name string
}

Object represents an object deployed by a Chart.

func (*Object) Delete

func (o *Object) Delete(ctx context.Context, client client.Client, namespace string) error

Delete deletes this object from the given namespace using the given client.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier