helm

package
v0.0.0-...-556b8be Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const GeneratedCanaryDestinationRule = `` /* 200-byte string literal not displayed */

GeneratedCanaryDestinationRule is a DestinationRule manifest for tests

View Source
const GeneratedCanaryService = `` /* 340-byte string literal not displayed */

GeneratedCanaryService is a Service manifest for tests

View Source
const GeneratedPrimaryDeployment = `` /* 523-byte string literal not displayed */

GeneratedPrimaryDeployment is a Deployment manifest for tests

View Source
const GeneratedPrimaryDestinationRule = `` /* 202-byte string literal not displayed */

GeneratedPrimaryDestinationRule is a DestinationRule manifest for tests

View Source
const GeneratedPrimaryService = `` /* 373-byte string literal not displayed */

GeneratedPrimaryService is a Service manifest for tests

View Source
const GeneratedVirtualService = `` /* 481-byte string literal not displayed */

GeneratedVirtualService is a VirtualService manifest for tests

Variables

This section is empty.

Functions

func DoesChartExist

func DoesChartExist(event keptnv2.EventData, chartName string, configServiceURL string, commitID string) (bool, error)

DoesChartExist checks if the GIT repo contains the specified chart

func Equals

func Equals(actual *chart.Chart, valuesExpected GeneratedResource, templatesExpected []GeneratedResource, t *testing.T)

func GetChartName

func GetChartName(service string, generated bool) string

GetChartName returns the name of the chart, e.g., ${SERVICE}[-generated]

func GetDeployments

func GetDeployments(helmManifest string) []*appsv1.Deployment

GetDeployments returns all deployments contained in the Helm manifest

func GetReleaseName

func GetReleaseName(project string, stage string, service string, generated bool) string

GetReleaseName returns the name of the Helm release, e.g., ${PROJECT}-${STAGE}-${SERVICE}[-generated]

func GetServices

func GetServices(helmManifest string) []*corev1.Service

GetServices returns all services contained in the Helm manifest

func GetTemplateByName

func GetTemplateByName(chart *chart.Chart, templateName string) *chart.File

func GetTestGeneratedChart

func GetTestGeneratedChart() chart.Chart

GetTestGeneratedChart returns a sample chart representing a "generated-chart"

func GetTestUserChart

func GetTestUserChart() chart.Chart

GetTestUserChart returns a sample chart representing a chart provided by the user

Types

type ChartGenerator

type ChartGenerator interface {
	// GenerateDuplicateChart generates a duplicated chart which is managed by keptn and used for
	// b/g and canary releases
	GenerateDuplicateChart(helmManifest string, project string, stageName string, service string) (*chart.Chart, error)
	// GenerateMeshChart generates a chart containing the required mesh setup
	GenerateMeshChart(helmManifest string, project string, stageName string, service string) (*chart.Chart, error)
}

ChartGenerator ...

type GeneratedChartGenerator

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

GeneratedChartGenerator allows to generate the generated-chart

func NewGeneratedChartGenerator

func NewGeneratedChartGenerator(mesh mesh.Mesh) *GeneratedChartGenerator

NewGeneratedChartGenerator creates a new GeneratedChartGenerator

func (*GeneratedChartGenerator) GenerateDuplicateChart

func (c *GeneratedChartGenerator) GenerateDuplicateChart(helmManifest string, project string, stageName string, service string) (*chart.Chart, error)

GenerateDuplicateChart generates a duplicated chart which is managed by keptn and used for b/g and canary releases

func (*GeneratedChartGenerator) GenerateMeshChart

func (c *GeneratedChartGenerator) GenerateMeshChart(helmManifest string, project string, stageName string,
	service string) (*chart.Chart, error)

GenerateMeshChart generates a chart containing the required mesh setup

type GeneratedResource

type GeneratedResource struct {
	URI         string
	FileContent []string
}

type HelmExecutor

type HelmExecutor interface {
	GetManifest(releaseName string, namespace string) (string, error)
	UpgradeChart(ch *chart.Chart, releaseName, namespace string, vals map[string]interface{}) error
	UninstallRelease(releaseName, namespace string) error
}

HelmExecutor is an interface for Helm operations

type HelmMockExecutor

type HelmMockExecutor struct {
}

HelmMockExecutor mocks Helm operations

func NewHelmMockExecutor

func NewHelmMockExecutor() *HelmMockExecutor

NewHelmMockExecutor creates a new HelmMockExecutor

func (*HelmMockExecutor) GetManifest

func (h *HelmMockExecutor) GetManifest(releaseName, namespace string) (string, error)

GetManifest returns test/sample manifests

func (*HelmMockExecutor) UninstallRelease

func (h *HelmMockExecutor) UninstallRelease(releaseName, namespace string) error

UninstallRelease does not execute any action

func (*HelmMockExecutor) UpgradeChart

func (h *HelmMockExecutor) UpgradeChart(ch *chart.Chart, releaseName, namespace string, vals map[string]interface{}) error

UpgradeChart does not execute any action

type HelmV3Executor

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

HelmV3Executor provides util functions to execute helm commands

func NewHelmV3Executor

func NewHelmV3Executor(logger keptncommon.LoggerInterface, nsManager namespacemanager.INamespaceManager) *HelmV3Executor

NewHelmV3Executor creates a new HelmV3Executor

func (*HelmV3Executor) GetManifest

func (h *HelmV3Executor) GetManifest(releaseName, namespace string) (string, error)

GetManifest returns the manifest for the provided release

func (*HelmV3Executor) UninstallRelease

func (h *HelmV3Executor) UninstallRelease(releaseName, namespace string) error

UninstallRelease uninstalls the specified release in the namespace

func (*HelmV3Executor) UpgradeChart

func (h *HelmV3Executor) UpgradeChart(ch *chart.Chart, releaseName, namespace string, vals map[string]interface{}) error

UpgradeChart upgrades the provided chart and waits for all deployments

Jump to

Keyboard shortcuts

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