chart

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStatefulSetObject

func IsStatefulSetObject(u unstructured.Unstructured) bool

Types

type HelmRenderer

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

func (*HelmRenderer) RenderManifest

func (c *HelmRenderer) RenderManifest(releaseInstance *ReleaseInstance) (string, error)

RenderManifest of the given chart as string.

func (*HelmRenderer) RenderManifestAsUnstructured

func (c *HelmRenderer) RenderManifestAsUnstructured(releaseInstance *ReleaseInstance) (*ManifestResources, error)

RenderManifestAsUnstructured of the given chart as unstructured objects.

type ManifestResources

type ManifestResources struct {
	Items []*unstructured.Unstructured
	Blobs [][]byte
}

ManifestResources holds a collection of objects.

func ParseManifestStringToObjects

func ParseManifestStringToObjects(manifest string) (*ManifestResources, error)

type ReleaseInstance

type ReleaseInstance struct {
	Name              string
	Namespace         string
	IstioEnabled      bool
	Configuration     map[string]interface{}
	RenderedManifests ManifestResources
}

func NewReleaseInstance

func NewReleaseInstance(name, namespace string, istioEnabled bool,
	configuration map[string]interface{}) *ReleaseInstance

func (*ReleaseInstance) GetConfiguration

func (c *ReleaseInstance) GetConfiguration() (map[string]interface{}, error)

func (*ReleaseInstance) GetStatefulSets

func (c *ReleaseInstance) GetStatefulSets() []*unstructured.Unstructured

GetStatefulSets returns a list of statefulSets from rendered manifests.

func (*ReleaseInstance) SetRenderedManifests

func (c *ReleaseInstance) SetRenderedManifests(renderedManifests ManifestResources)

type Renderer

type Renderer interface {
	// RenderManifest of the given chart.
	RenderManifest(*ReleaseInstance) (string, error)

	// RenderManifestAsUnstructured of the given chart as unstructured objects.
	RenderManifestAsUnstructured(*ReleaseInstance) (*ManifestResources, error)
}

func NewHelmRenderer

func NewHelmRenderer(chartPath string, logger *zap.SugaredLogger) (Renderer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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