steps

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 23 Imported by: 32

Documentation

Overview

Package steps contains implementation for all installation steps. Not all are moved yet, work in progress

Index

Constants

This section is empty.

Variables

View Source
var TestChartDir = flag.String("testchartdir", "./test-kyma", "Test chart directory")

TestChartDir is a mock directory for tests

Functions

This section is empty.

Types

type DeprovisionConfig

type DeprovisionConfig struct {
	BindingDeleteMaxReps    int
	BindingDeleteSleepTime  int
	InstanceDeleteMaxReps   int
	InstanceDeleteSleepTime int
}

DeprovisionConfig is used to parametrize deprovisioning of Azure Resources

func DefaultDeprovisionConfig

func DefaultDeprovisionConfig() *DeprovisionConfig

DefaultDeprovisionConfig returns default config for deprovisioning Azure Resources

type InstallationSteps

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

InstallationSteps .

func New

func New(helmClient kymahelm.ClientInterface, kubeClientset *kubernetes.Clientset, serviceCatalog serviceCatalog.ClientInterface, kymaDir string, statusManager statusmanager.StatusManager, actionManager actionmanager.ActionManager, kymaCommandExecutor toolkit.CommandExecutor, kymaPackageClient KymaPackageInterface) *InstallationSteps

New .

func (*InstallationSteps) DeprovisionAzureResources

func (steps *InstallationSteps) DeprovisionAzureResources(config *DeprovisionConfig, installation installationConfig.InstallationContext) error

DeprovisionAzureResources performs automatic removal of all resources created with Azure Broker.

func (InstallationSteps) DownloadKyma

func (steps InstallationSteps) DownloadKyma(installationData *config.InstallationData) error

DownloadKyma .

func (*InstallationSteps) InstallClusterEssentials

func (steps *InstallationSteps) InstallClusterEssentials(installationData *config.InstallationData) error

InstallClusterEssentials .

func (*InstallationSteps) InstallClusterPrerequisites

func (steps *InstallationSteps) InstallClusterPrerequisites(installationData *config.InstallationData) error

InstallClusterPrerequisites will install all needed before Kyma installation resources

func (InstallationSteps) InstallCore

func (steps InstallationSteps) InstallCore(installationData *config.InstallationData) error

InstallCore .

func (*InstallationSteps) InstallDex

func (steps *InstallationSteps) InstallDex(installationData *config.InstallationData) error

InstallDex installs Dex component

func (*InstallationSteps) InstallEcDefaultRemoteEnvironments

func (steps *InstallationSteps) InstallEcDefaultRemoteEnvironments(installationData *config.InstallationData) error

InstallEcDefaultRemoteEnvironments function will install EC Remote Environments

func (*InstallationSteps) InstallHmcDefaultRemoteEnvironments

func (steps *InstallationSteps) InstallHmcDefaultRemoteEnvironments(installationData *config.InstallationData) error

InstallHmcDefaultRemoteEnvironments function will install Hmc Remote Environments

func (*InstallationSteps) InstallIstio

func (steps *InstallationSteps) InstallIstio(installationData *config.InstallationData) error

InstallIstio .

func (*InstallationSteps) InstallKyma

func (steps *InstallationSteps) InstallKyma(installationData *config.InstallationData) error

InstallKyma .

func (*InstallationSteps) InstallPrometheus

func (steps *InstallationSteps) InstallPrometheus(installationData *config.InstallationData) error

InstallPrometheus .

func (*InstallationSteps) PrintInstallationStep

func (steps *InstallationSteps) PrintInstallationStep(stepName string)

PrintInstallationStep .

func (InstallationSteps) ProvisionBundles

func (steps InstallationSteps) ProvisionBundles(installationData *config.InstallationData) error

ProvisionBundles .

func (InstallationSteps) RemoveKymaComponents

func (steps InstallationSteps) RemoveKymaComponents()

RemoveKymaComponents .

func (*InstallationSteps) RemoveKymaSources

func (steps *InstallationSteps) RemoveKymaSources(installationData *config.InstallationData) error

RemoveKymaSources .

func (*InstallationSteps) UninstallKyma

func (steps *InstallationSteps) UninstallKyma(installationData *config.InstallationData) error

UninstallKyma .

func (InstallationSteps) UpdateBundles

func (steps InstallationSteps) UpdateBundles(installationData *config.InstallationData) error

UpdateBundles .

func (*InstallationSteps) UpdateClusterEssentials

func (steps *InstallationSteps) UpdateClusterEssentials(installationData *config.InstallationData) error

UpdateClusterEssentials .

func (*InstallationSteps) UpdateClusterPrerequisites

func (steps *InstallationSteps) UpdateClusterPrerequisites(installationData *config.InstallationData) error

UpdateClusterPrerequisites will update all needed before Kyma installation resources

func (*InstallationSteps) UpdateDex

func (steps *InstallationSteps) UpdateDex(installationData *config.InstallationData) error

UpdateDex updates Dex component

func (*InstallationSteps) UpdateEcDefaultRemoteEnvironments

func (steps *InstallationSteps) UpdateEcDefaultRemoteEnvironments(installationData *config.InstallationData) error

UpdateEcDefaultRemoteEnvironments function will install EC Remote Environments

func (*InstallationSteps) UpdateHmcDefaultRemoteEnvironments

func (steps *InstallationSteps) UpdateHmcDefaultRemoteEnvironments(installationData *config.InstallationData) error

UpdateHmcDefaultRemoteEnvironments function will install Hmc Remote Environments

func (*InstallationSteps) UpdateIstio

func (steps *InstallationSteps) UpdateIstio(installationData *config.InstallationData) error

UpdateIstio .

func (*InstallationSteps) UpdateKyma

func (steps *InstallationSteps) UpdateKyma(installationData *config.InstallationData) error

UpdateKyma .

func (*InstallationSteps) UpdatePrometheus

func (steps *InstallationSteps) UpdatePrometheus(installationData *config.InstallationData) error

UpdatePrometheus .

func (InstallationSteps) UpgradeCore

func (steps InstallationSteps) UpgradeCore(installationData *config.InstallationData) error

UpgradeCore .

type KymaPackageClient

type KymaPackageClient struct {
}

KymaPackageClient .

func (*KymaPackageClient) CreateDir

func (kymaPackageClient *KymaPackageClient) CreateDir(kymaPath string) error

CreateDir .

func (*KymaPackageClient) NeedDownload

func (kymaPackageClient *KymaPackageClient) NeedDownload(kymaPath string) bool

NeedDownload .

func (*KymaPackageClient) RemoveDir

func (kymaPackageClient *KymaPackageClient) RemoveDir(kymaPath string) error

RemoveDir .

type KymaPackageInterface

type KymaPackageInterface interface {
	CreateDir(kymaPath string) error
	NeedDownload(kymaPath string) bool
	RemoveDir(kymaPath string) error
}

KymaPackageInterface .

type MockCommandExecutor

type MockCommandExecutor struct {
	TimesMockCommandExecutorCalled     int
	TimesMockBashCommandExecutorCalled int
}

MockCommandExecutor .

func (*MockCommandExecutor) RunBashCommand

func (kymaCommandExecutor *MockCommandExecutor) RunBashCommand(scriptPath string, execArgs ...string) error

RunBashCommand .

func (*MockCommandExecutor) RunCommand

func (kymaCommandExecutor *MockCommandExecutor) RunCommand(execPath string, execArgs ...string) error

RunCommand .

type MockErrorHelmClient

type MockErrorHelmClient struct {
	InstallReleaseCalled            bool
	InstallReleaseWithoutWaitCalled bool
	UpgradeReleaseCalled            bool
	ReleaseStatusCalled             bool
}

MockErrorHelmClient is a fake helm client that always returns an error

func (*MockErrorHelmClient) DeleteRelease

func (mehc *MockErrorHelmClient) DeleteRelease(releaseName string) (*rls.UninstallReleaseResponse, error)

DeleteRelease mocks a call to helm client's DeleteRelease function

func (*MockErrorHelmClient) InstallRelease

func (mehc *MockErrorHelmClient) InstallRelease(chartdir, ns, releasename, overrides string) (*rls.InstallReleaseResponse, error)

InstallRelease mocks a call to helm client's InstallRelease function

func (*MockErrorHelmClient) InstallReleaseFromChart

func (mehc *MockErrorHelmClient) InstallReleaseFromChart(chartdir, ns, releaseName, overrides string) (*rls.InstallReleaseResponse, error)

InstallReleaseFromChart mocks a call to helm client's InstallReleaseFromChart function

func (*MockErrorHelmClient) InstallReleaseWithoutWait

func (mehc *MockErrorHelmClient) InstallReleaseWithoutWait(chartdir, ns, releasename, overrides string) (*rls.InstallReleaseResponse, error)

InstallReleaseWithoutWait mocks a call to helm client's InstallReleaseWithoutWait function

func (*MockErrorHelmClient) ListReleases

func (mehc *MockErrorHelmClient) ListReleases() (*rls.ListReleasesResponse, error)

ListReleases mocks a call to helm client's ListRelease function

func (*MockErrorHelmClient) PrintRelease

func (mehc *MockErrorHelmClient) PrintRelease(release *release.Release)

PrintRelease mocks a call to helm client's PrintRelease function

func (*MockErrorHelmClient) ReleaseStatus

func (mehc *MockErrorHelmClient) ReleaseStatus(rname string) (string, error)

ReleaseStatus mocks a call to helm client's ReleaseStatus function

func (*MockErrorHelmClient) UpgradeRelease

func (mehc *MockErrorHelmClient) UpgradeRelease(chartDir, releaseName, overrides string) (*rls.UpdateReleaseResponse, error)

UpgradeRelease mocks a call to helm client's UpgradeRelease function

type MockFailingCommandExecutor

type MockFailingCommandExecutor struct {
	MockFailingCommandExecutorCalled     bool
	MockFailingBashCommandExecutorCalled bool
}

MockFailingCommandExecutor .

func (*MockFailingCommandExecutor) RunBashCommand

func (kymaFailingCommandExecutor *MockFailingCommandExecutor) RunBashCommand(scriptPath string, execArgs ...string) error

RunBashCommand .

func (*MockFailingCommandExecutor) RunCommand

func (kymaFailingCommandExecutor *MockFailingCommandExecutor) RunCommand(execPath string, execArgs ...string) error

RunCommand .

type MockHelmClient

type MockHelmClient struct {
	InstallReleaseCalled            bool
	InstallReleaseWithoutWaitCalled bool
	UpgradeReleaseCalled            bool
}

MockHelmClient is a fake helm client that returns no errors

func (*MockHelmClient) DeleteRelease

func (mhc *MockHelmClient) DeleteRelease(releaseName string) (*rls.UninstallReleaseResponse, error)

DeleteRelease mocks a call to helm client's DeleteRelease function

func (*MockHelmClient) InstallRelease

func (mhc *MockHelmClient) InstallRelease(chartdir, ns, releasename, overrides string) (*rls.InstallReleaseResponse, error)

InstallRelease mocks a call to helm client's InstallRelease function

func (*MockHelmClient) InstallReleaseFromChart

func (mhc *MockHelmClient) InstallReleaseFromChart(chartdir, ns, releaseName, overrides string) (*rls.InstallReleaseResponse, error)

InstallReleaseFromChart mocks a call to helm client's InstallReleaseFromChart function

func (*MockHelmClient) InstallReleaseWithoutWait

func (mhc *MockHelmClient) InstallReleaseWithoutWait(chartdir, ns, releasename, overrides string) (*rls.InstallReleaseResponse, error)

InstallReleaseWithoutWait mocks a call to helm client's InstallReleaseWithoutWait function

func (*MockHelmClient) ListReleases

func (mhc *MockHelmClient) ListReleases() (*rls.ListReleasesResponse, error)

ListReleases mocks a call to helm client's ListRelease function

func (*MockHelmClient) PrintRelease

func (mhc *MockHelmClient) PrintRelease(release *release.Release)

PrintRelease mocks a call to helm client's PrintRelease function

func (*MockHelmClient) ReleaseStatus

func (mhc *MockHelmClient) ReleaseStatus(rname string) (string, error)

ReleaseStatus mocks a call to helm client's ReleaseStatus function

func (*MockHelmClient) UpgradeRelease

func (mhc *MockHelmClient) UpgradeRelease(chartDir, releaseName, overrides string) (*rls.UpdateReleaseResponse, error)

UpgradeRelease mocks a call to helm client's UpgradeRelease function

Jump to

Keyboard shortcuts

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