deployment

package
v0.0.0-...-6a1c4ee Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 46 Imported by: 1

Documentation

Overview

Package deployment provides a top-level API to control Kyma deployment and uninstallation.

Package deployment provides a top-level API to control Kyma deployment and uninstallation.

Package deployment provides a top-level API to control Kyma deployment and uninstallation.

Package deployment provides a top-level API to control Kyma deployment and uninstallation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultResourceManager

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

DefaultResourceManager provides a default implementation of ResourceManager.

func NewDefaultResourceManager

func NewDefaultResourceManager(kubeconfigSource config.KubeconfigSource, log logger.Interface, retryOptions []retry.Option) (*DefaultResourceManager, error)

NewDefaultResourceManager creates a new instance of ResourceManager.

func (*DefaultResourceManager) CreateResource

func (*DefaultResourceManager) DeleteCollectionOfResources

func (c *DefaultResourceManager) DeleteCollectionOfResources(gvk schema.GroupVersionKind, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error

func (*DefaultResourceManager) GetResource

func (c *DefaultResourceManager) GetResource(resourceName string, gvk schema.GroupVersionKind, opts metav1.GetOptions) (obj *unstructured.Unstructured, err error)

func (*DefaultResourceManager) UpdateResource

type Deletion

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

Deletion removes Kyma from a cluster

func NewDeletion

func NewDeletion(cfg *config.Config, ob *overrides.Builder, processUpdates func(ProcessUpdate), retryOptions []retry.Option) (*Deletion, error)

NewDeletion creates a new Deployment instance for deleting Kyma on a cluster.

func (*Deletion) StartKymaUninstallation

func (i *Deletion) StartKymaUninstallation() error

StartKymaUninstallation removes Kyma from a cluster

type Deployment

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

Deployment deploys Kyma on a cluster

func NewDeployment

func NewDeployment(cfg *config.Config, ob *overrides.Builder, processUpdates func(ProcessUpdate)) (*Deployment, error)

NewDeployment creates a new Deployment instance for deploying Kyma on a cluster.

func (*Deployment) DefaultUpdater

func (i *Deployment) DefaultUpdater() func(update ProcessUpdate)

func (*Deployment) StartKymaDeployment

func (d *Deployment) StartKymaDeployment() error

StartKymaDeployment deploys Kyma to a cluster

type GenericResourceApplier

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

GenericResourceApplier is a default implementation of ResourceApplier.

func NewGenericResourceApplier

func NewGenericResourceApplier(log logger.Interface, resourceManager ResourceManager) *GenericResourceApplier

NewGenericResourceApplier returns a new instance of GenericResourceApplier.

func (*GenericResourceApplier) Apply

type GenericResourceParser

type GenericResourceParser struct{}

GenericResourceParser is a default implementation of ResourceParser.

func (*GenericResourceParser) ParseFile

func (c *GenericResourceParser) ParseFile(path string) (obj *unstructured.Unstructured, err error)

type InstallationPhase

type InstallationPhase string

InstallationPhase represents the current installation phase

const (
	// InstallPreRequisites indicates the main process is installing pre-requisites
	InstallPreRequisites InstallationPhase = "InstallPreRequisites"
	// UninstallPreRequisites indicates the main process is removing pre-requisites
	UninstallPreRequisites InstallationPhase = "UninstallPreRequisites"
	// InstallComponents indicates the main process is installing components
	InstallComponents InstallationPhase = "InstallComponents"
	// UninstallComponents indicates the main process is removing components
	UninstallComponents InstallationPhase = "UninstallComponents"
)

type ProcessEvent

type ProcessEvent string

ProcessEvent represents an event fired during process executing

const (
	// ProcessStart is set when main process gets started
	ProcessStart ProcessEvent = "ProcessStart"
	// ProcessRunning is indicating a running main process
	ProcessRunning ProcessEvent = "ProcessRunning"
	// ProcessFinished indicates a successfully finished main process
	ProcessFinished ProcessEvent = "ProcessFinished"
	// ProcessExecutionFailure indicates a failure during the execution (install/uninstall of a component failed)
	ProcessExecutionFailure ProcessEvent = "ProcessExecutionFailure"
	// ProcessTimeoutFailure indicates an exceeded timeout
	ProcessTimeoutFailure ProcessEvent = "ProcessTimeoutFailure"
	// ProcessForceQuitFailure indicates an cancelled main process
	ProcessForceQuitFailure ProcessEvent = "ProcessForceQuitFailure"
)

type ProcessUpdate

type ProcessUpdate struct {
	Event ProcessEvent
	Phase InstallationPhase
	Error error
	//Component is only set during the component install/uninstall phase
	Component components.KymaComponent
}

ProcessUpdate is an update of the main process

func (*ProcessUpdate) IsComponentUpdate

func (pu *ProcessUpdate) IsComponentUpdate() bool

func (ProcessUpdate) String

func (pu ProcessUpdate) String() string

type ResourceApplier

type ResourceApplier interface {
	// Apply passed resource object on a k8s cluster.
	Apply(resource *unstructured.Unstructured) error
}

ResourceApplier creates a new resource from an object on k8s cluster.

type ResourceManager

type ResourceManager interface {
	// CreateResource from a given object and schema on k8s cluster.
	// Performs retries on unsuccessful resource creation action.
	CreateResource(resource *unstructured.Unstructured, gvk schema.GroupVersionKind, opts metav1.CreateOptions) error

	// GetResource of a given name from a k8s cluster, that matches the schema.
	// Performs retries on unsuccessful resource retrieval action.
	GetResource(resourceName string, gvk schema.GroupVersionKind, opts metav1.GetOptions) (*unstructured.Unstructured, error)

	// UpdateResource on a k8s cluster, that matches the schema.
	// Performs retries on unsuccessful resource update action.
	UpdateResource(resource *unstructured.Unstructured, gvk schema.GroupVersionKind, opts metav1.UpdateOptions) (*unstructured.Unstructured, error)

	// DeleteCollectionOfResources from a k8s cluster, that match the schema, using query options for filtering them.
	// Performs retries on unsuccessful resources delete action.
	DeleteCollectionOfResources(gvk schema.GroupVersionKind, opts metav1.DeleteOptions, listOps metav1.ListOptions) error
}

ResourceManager manages resources on a k8s cluster.

type ResourceParser

type ResourceParser interface {
	// ParseFile from a given path and return it.
	ParseFile(path string) (*unstructured.Unstructured, error)
}

ResourceParser parses a resource from a given input.

type Templating

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

Templating renders Kyma charts

func NewTemplating

func NewTemplating(cfg *config.Config, ob *overrides.Builder) (*Templating, error)

NewTemplating creates a new Templating instance for rendering Kyma charts.

func (*Templating) Render

func (t *Templating) Render(includeCRD bool) ([]*components.Manifest, error)

Render renders the Kyma component templates

Directories

Path Synopsis
Package Gardener contains special logic to manage installation in Gardener clusters
Package Gardener contains special logic to manage installation in Gardener clusters
Package k3d contains special logic to manage installation in k3d clusters
Package k3d contains special logic to manage installation in k3d clusters

Jump to

Keyboard shortcuts

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