chart

package
v0.0.0-...-1764fb8 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

type Chart

type Chart struct {
	Name       string
	Path       string
	Images     []string
	ValuesFunc func(string, *gardenv1beta1.Shoot, map[string]string) (map[string]interface{}, error)
	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,
	k8sClient gardenerkubernetes.Interface,
	chartApplier gardenerkubernetes.ChartApplier,
	namespace string,
	shoot *gardenv1beta1.Shoot,
	imageVector imagevector.ImageVector,
	checksums map[string]string,
	additionalValues map[string]interface{},
) error

Apply applies this chart into the given namespace using the given chartApplier. Before applying the chart, it collects its values, starting with values returned by ValuesFunc, and injecting images, subchart values, and provider 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.

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.

Jump to

Keyboard shortcuts

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