preparation

package
v0.0.0-...-45a1072 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const FIFOPrefix = "tko-preparation-"

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Preparation             *Preparation
	Log                     commonlog.Logger
	DeploymentID            string
	DeploymentPackage       util.Package
	TargetResourceIdentifer util.ResourceIdentifier
}

func (*Context) GetMergePackage

func (self *Context) GetMergePackage(objectReferences []any) (bool, util.Package, error)

func (*Context) GetTargetResource

func (self *Context) GetTargetResource() (util.Resource, bool)

func (*Context) ToPluginInput

func (self *Context) ToPluginInput(logFile string, logAddressPort string) PluginInput

type Controller

type Controller struct {
	*util.Controller

	Preparation *Preparation
	// contains filtered or unexported fields
}

func NewController

func NewController(preparation *Preparation, interval time.Duration, log commonlog.Logger) *Controller

type PluginInput

type PluginInput struct {
	GRPC                    PluginInputGRPC            `yaml:"grpc"`
	LogFile                 string                     `yaml:"logFile"`
	LogAddressPort          string                     `yaml:"logAddressPort"`
	DeploymentID            string                     `yaml:"deploymentId"`
	DeploymentPackage       tkoutil.Package            `yaml:"deploymentPackage"`
	TargetResourceIdentifer tkoutil.ResourceIdentifier `yaml:"targetResourceIdentifier"`
}

type PluginInputGRPC

type PluginInputGRPC struct {
	Level2Protocol string `yaml:"level2protocol"`
	Address        string `yaml:"address"`
	Port           int    `yaml:"port"`
}

type PluginOutput

type PluginOutput struct {
	Prepared bool            `yaml:"prepared,omitempty"`
	Package  tkoutil.Package `yaml:"package,omitempty"`
	Error    string          `yaml:"error,omitempty"`
}

type Preparation

type Preparation struct {
	Client             *clientpkg.Client
	Timeout            time.Duration
	DefaultAutoApprove bool
	Log                commonlog.Logger
	LogIPStack         util.IPStack
	LogAddress         string
	LogPort            int
	// contains filtered or unexported fields
}

func NewPreparation

func NewPreparation(client *clientpkg.Client, timeout time.Duration, defaultAutoApprove bool, log commonlog.Logger, logIpStack util.IPStack, logAddress string, logPort int) *Preparation

func (*Preparation) GetPreparableResources

func (self *Preparation) GetPreparableResources(package_ tkoutil.Package, log commonlog.Logger) *tkoutil.ResourceIdentifiers

func (*Preparation) GetPreparers

func (self *Preparation) GetPreparers(gvk tkoutil.GVK) (Preparers, error)

func (*Preparation) IsDeploymentFullyPrepared

func (self *Preparation) IsDeploymentFullyPrepared(package_ tkoutil.Package) bool

func (*Preparation) IsResourcePreparable

func (self *Preparation) IsResourcePreparable(resourceIdentifier tkoutil.ResourceIdentifier, resource tkoutil.Resource, log commonlog.Logger) (bool, []PrepareFunc)

func (*Preparation) NewContext

func (self *Preparation) NewContext(deploymentId string, deploymentPackage util.Package, targetResourceIdentifer util.ResourceIdentifier, log commonlog.Logger) *Context

func (*Preparation) PrepareDeployment

func (self *Preparation) PrepareDeployment(deploymentInfo client.DeploymentInfo) error

func (*Preparation) PrepareDeployments

func (self *Preparation) PrepareDeployments() error

func (*Preparation) RegisterPreparer

func (self *Preparation) RegisterPreparer(gvk tkoutil.GVK, prepare PrepareFunc)

func (*Preparation) ResetPluginCache

func (self *Preparation) ResetPluginCache()

type PrepareFunc

type PrepareFunc func(context contextpkg.Context, preparationContext *Context) (bool, []ard.Map, error)

func NewCommandPluginPreparer

func NewCommandPluginPreparer(plugin client.Plugin, logIpStack util.IPStack, logAddress string, logPort int) (PrepareFunc, error)

func NewKptPluginPreparer

func NewKptPluginPreparer(plugin client.Plugin) (PrepareFunc, error)

func NewPluginPreparer

func NewPluginPreparer(plugin client.Plugin, logIpStack util.IPStack, logAddress string, logPort int) (PrepareFunc, error)

type Preparers

type Preparers []PrepareFunc

type PreparersMap

type PreparersMap map[tkoutil.GVK]Preparers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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