controller

package
v0.0.0-...-8766ec0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ActionScaling = "scaling"

ActionScaling is the identifier for the scaling action

Variables

View Source
var GracefulShutdownKey = gracefulShutdownKeyType{}

Functions

This section is empty.

Types

type ActionTriggeredHandler

type ActionTriggeredHandler struct {
	Handler
	// contains filtered or unexported fields
}

ActionTriggeredHandler handles sh.keptn.events.action.triggered events for scaling

func NewActionTriggeredHandler

func NewActionTriggeredHandler(keptnHandler Handler, configChanger configurationchanger.IConfigurationChanger) *ActionTriggeredHandler

NewActionTriggeredHandler creates a new ActionTriggeredHandler

func (*ActionTriggeredHandler) HandleEvent

func (h *ActionTriggeredHandler) HandleEvent(ce cloudevents.Event)

HandleEvent takes the sh.keptn.events.action.triggered event and performs the scaling action on the generated chart Therefore, this scaling action only works if the service is deployed b/g

type DeleteHandler

type DeleteHandler struct {
	Handler
	// contains filtered or unexported fields
}

DeleteHandler handles sh.keptn.internal.event.service.delete events

func NewDeleteHandler

func NewDeleteHandler(keptnHandler Handler, stagesHandler types.IStagesHandler, configServiceURL string) *DeleteHandler

NewDeleteHandler creates a new DeleteHandler

func (*DeleteHandler) HandleEvent

func (h *DeleteHandler) HandleEvent(ce cloudevents.Event)

HandleEvent takes the sh.keptn.internal.event.service.delete event and deletes the service in all stages

type DeploymentHandler

type DeploymentHandler struct {
	Handler
	// contains filtered or unexported fields
}

DeploymentHandler is a handler for doing the deployment and optionally first change the configuration

func NewDeploymentHandler

func NewDeploymentHandler(keptnHandler Handler,
	mesh mesh.Mesh,
	onboarder Onboarder,
	chartGenerator helm.ChartGenerator) *DeploymentHandler

NewDeploymentHandler creates a new DeploymentHandler

func (*DeploymentHandler) HandleEvent

func (h *DeploymentHandler) HandleEvent(ce cloudevents.Event)

HandleEvent handles deployment.triggered events by first changing the new configuration and afterwards applying the configuration in the cluster

type Handler

type Handler interface {
	HandleEvent(ce cloudevents.Event)
	// contains filtered or unexported methods
}

Handler provides methods for handling received Keptn events

type HandlerBase

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

HandlerBase provides basic functionality for all handlers

func NewHandlerBase

func NewHandlerBase(keptnHandler *keptnv2.Keptn, helmExecutor helm.HelmExecutor, configServiceURL string) *HandlerBase

NewHandlerBase creates a new HandlerBase

func (*HandlerBase) HandleEvent

func (h *HandlerBase) HandleEvent(_ce cloudevents.Event)

type MockedHandler

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

MockedHandler mocks typical tasks of a handler

func NewMockedHandler

func NewMockedHandler(keptnHandler *keptnv2.Keptn, configServiceURL string, options ...MockedHandlerOption) *MockedHandler

NewMockedHandler creates a MockedHandler

func (*MockedHandler) HandleEvent

func (h *MockedHandler) HandleEvent(e cloudevents.Event)

type MockedHandlerOption

type MockedHandlerOption func(*MockedHandlerOptions)

MockedHandlerOption function is used to configure the mock

type MockedHandlerOptions

type MockedHandlerOptions struct {
	SendEventBehavior               func(eventType string) bool
	GetUserManagedEndpointsBehavior func(event keptnv2.EventData) (*keptnv2.Endpoints, error)
	GetUserChartsErrBehaviour       bool
}

MockedHandlerOptions contains configuration items for the mock

type Onboarder

type Onboarder interface {

	// OnboardGeneratedChart generates the generated chart using the Helm manifests of the user chart
	// as well as the specified deployment strategy
	OnboardGeneratedChart(helmManifest string, event keptnv2.EventData, strategy keptnevents.DeploymentStrategy) (*chart.Chart, error)
}

Onboarder is responsible for onboarding a service

func NewOnboarder

func NewOnboarder(
	keptnHandler Handler,
	namespaceManager namespacemanager.INamespaceManager,
	chartStorer types.IChartStorer,
	chartGenerator helm.ChartGenerator,
	chartPackager types.IChartPackager) Onboarder

NewOnboarder creates a new onboarder instance

type ReleaseHandler

type ReleaseHandler struct {
	Handler
	// contains filtered or unexported fields
}

ReleaseHandler is a handler for releasing a service

func NewReleaseHandler

func NewReleaseHandler(keptnHandler Handler,
	mesh mesh.Mesh,
	configurationChanger configurationchanger.IConfigurationChanger,
	chartGenerator helm.ChartGenerator,
	chartStorer keptntypes.IChartStorer,
	chartPackager keptntypes.IChartPackager) *ReleaseHandler

NewReleaseHandler creates a ReleaseHandler

func (*ReleaseHandler) HandleEvent

func (h *ReleaseHandler) HandleEvent(ce cloudevents.Event)

HandleEvent handles release.triggered events and either promotes or aborts an artifact

type RollbackHandler

type RollbackHandler struct {
	Handler
	// contains filtered or unexported fields
}

func NewRollbackHandler

func NewRollbackHandler(keptnHandler Handler,
	mesh mesh.Mesh,
	configurationChanger configurationchanger.IConfigurationChanger) *RollbackHandler

func (*RollbackHandler) HandleEvent

func (r *RollbackHandler) HandleEvent(ce cloudevents.Event)

Jump to

Keyboard shortcuts

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