Documentation
¶
Index ¶
- Constants
- func DoesChartExist(event keptnv2.EventData, chartName string, configServiceURL string, ...) (bool, error)
- func Equals(actual *chart.Chart, valuesExpected GeneratedResource, ...)
- func GetChartName(service string, generated bool) string
- func GetDeployments(helmManifest string) []*appsv1.Deployment
- func GetReleaseName(project string, stage string, service string, generated bool) string
- func GetServices(helmManifest string) []*corev1.Service
- func GetTemplateByName(chart *chart.Chart, templateName string) *chart.File
- func GetTestGeneratedChart() chart.Chart
- func GetTestUserChart() chart.Chart
- type ChartGenerator
- type GeneratedChartGenerator
- type GeneratedResource
- type HelmExecutor
- type HelmMockExecutor
- type HelmV3Executor
Constants ¶
const GeneratedCanaryDestinationRule = `` /* 200-byte string literal not displayed */
GeneratedCanaryDestinationRule is a DestinationRule manifest for tests
const GeneratedCanaryService = `` /* 340-byte string literal not displayed */
GeneratedCanaryService is a Service manifest for tests
const GeneratedPrimaryDeployment = `` /* 523-byte string literal not displayed */
GeneratedPrimaryDeployment is a Deployment manifest for tests
const GeneratedPrimaryDestinationRule = `` /* 202-byte string literal not displayed */
GeneratedPrimaryDestinationRule is a DestinationRule manifest for tests
const GeneratedPrimaryService = `` /* 373-byte string literal not displayed */
GeneratedPrimaryService is a Service manifest for tests
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 ¶
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 ¶
GetReleaseName returns the name of the Helm release, e.g., ${PROJECT}-${STAGE}-${SERVICE}[-generated]
func GetServices ¶
GetServices returns all services contained in the Helm manifest
func GetTemplateByName ¶
func GetTestGeneratedChart ¶
GetTestGeneratedChart returns a sample chart representing a "generated-chart"
func GetTestUserChart ¶
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 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