Back to godoc.org

Package workflow

v0.0.0-...-083858d
Latest Go to latest

The highest tagged major version is .

Published: today | License: Apache-2.0 | Module: github.com/banzaicloud/pipeline

Index

Constants

const CreateClusterWorkflowName = "pke-vsphere-create-cluster"
const CreateNodeActivityName = "pke-vsphere-create-node"

CreateNodeActivityName is the default registration name of the activity

const DeleteClusterFromStoreActivityName = "pke-vsphere-delete-cluster-from-store"
const DeleteClusterWorkflowName = "pke-vsphere-delete-cluster"
const DeleteK8sNodeActivityName = "delete-k8s-node"
const DeleteNodeActivityName = "pke-vsphere-delete-node"

DeleteNodeActivityName is the default registration name of the activity

const DeleteNodePoolFromStoreActivityName = "pke-vsphere-delete-node-pool-from-store"
const DeleteNodePoolWorkflowName = "pke-vsphere-delete-nodepool"
const GetPublicAddressActivityName = "pke-vsphere-get-public-address"

GetPublicAddressActivityName is the default registration name of the activity

const SetClusterStatusActivityName = "pke-vsphere-set-cluster-status"
const UpdateClusterWorkflowName = "pke-vsphere-update-cluster"
const WaitForIPActivityName = "pke-vsphere-wait-for-ip"

WaitForIPActivityName is the default registration name of the activity

func CreateClusterWorkflow

func CreateClusterWorkflow(ctx workflow.Context, input CreateClusterWorkflowInput) error

func DeleteClusterWorkflow

func DeleteClusterWorkflow(ctx workflow.Context, input DeleteClusterWorkflowInput) error

func DeleteNodePoolWorkflow

func DeleteNodePoolWorkflow(ctx workflow.Context, input DeleteNodePoolWorkflowInput) error

func UpdateClusterWorkflow

func UpdateClusterWorkflow(ctx workflow.Context, input UpdateClusterWorkflowInput) error

type CreateClusterWorkflowInput

type CreateClusterWorkflowInput struct {
	ClusterID        uint
	ClusterName      string
	ClusterUID       string
	OrganizationID   uint
	OrganizationName string
	ResourcePoolName string
	FolderName       string
	DatastoreName    string
	SecretID         string
	StorageSecretID  string
	OIDCEnabled      bool
	PostHooks        pkgCluster.PostHooks
	Nodes            []Node
	HTTPProxy        intPKE.HTTPProxy
	NodePoolLabels   map[string]map[string]string
}

CreateClusterWorkflowInput

type CreateNodeActivity

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

CreateNodeActivity represents an activity for creating a vSphere virtual machine

func MakeCreateNodeActivity

func MakeCreateNodeActivity(vmomiClientFactory *VMOMIClientFactory, tokenGenerator pkeworkflowadapter.TokenGenerator, secretStore pkeworkflow.SecretStore) CreateNodeActivity

MakeCreateNodeActivity returns a new CreateNodeActivity

func (CreateNodeActivity) Execute

func (a CreateNodeActivity) Execute(ctx context.Context, input CreateNodeActivityInput) (types.ManagedObjectReference, error)

Execute performs the activity

type CreateNodeActivityInput

type CreateNodeActivityInput struct {
	OrganizationID   uint
	ClusterID        uint
	SecretID         string
	StorageSecretID  string
	ClusterName      string
	ResourcePoolName string
	FolderName       string
	DatastoreName    string
	Node
}

CreateNodeActivityInput represents the input needed for executing a CreateNodeActivity

type DeleteClusterFromStoreActivity

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

func MakeDeleteClusterFromStoreActivity

func MakeDeleteClusterFromStoreActivity(store pke.ClusterStore) DeleteClusterFromStoreActivity

func (DeleteClusterFromStoreActivity) Execute

func (a DeleteClusterFromStoreActivity) Execute(ctx context.Context, input DeleteClusterFromStoreActivityInput) error

type DeleteClusterFromStoreActivityInput

type DeleteClusterFromStoreActivityInput struct {
	ClusterID uint
}

type DeleteClusterWorkflowInput

type DeleteClusterWorkflowInput struct {
	ClusterID        uint
	ClusterName      string
	ClusterUID       string
	K8sSecretID      string
	OrganizationID   uint
	OrganizationName string
	ResourcePoolName string
	FolderName       string
	DatastoreName    string
	SecretID         string
	MasterNodes      []Node
	Nodes            []Node
	Forced           bool
}

DeleteClusterWorkflowInput

type DeleteK8sNodeActivity

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

func MakeDeleteK8sNodeActivity

func MakeDeleteK8sNodeActivity(k8sConfigGetter K8sConfigGetter) DeleteK8sNodeActivity

func (DeleteK8sNodeActivity) Execute

func (a DeleteK8sNodeActivity) Execute(ctx context.Context, input DeleteK8sNodeActivityInput) error

type DeleteK8sNodeActivityInput

type DeleteK8sNodeActivityInput struct {
	OrganizationID uint
	ClusterName    string
	K8sSecretID    string
	Name           string
}

type DeleteNodeActivity

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

DeleteNodeActivity represents an activity for creating a vSphere virtual machine

func MakeDeleteNodeActivity

func MakeDeleteNodeActivity(vmomiClientFactory *VMOMIClientFactory) DeleteNodeActivity

MakeDeleteNodeActivity returns a new DeleteNodeActivity

func (DeleteNodeActivity) Execute

func (a DeleteNodeActivity) Execute(ctx context.Context, input DeleteNodeActivityInput) (existed bool, err error)

Execute performs the activity In case of success, it returns whether the given node existed or not.

type DeleteNodeActivityInput

type DeleteNodeActivityInput struct {
	OrganizationID uint
	ClusterID      uint
	SecretID       string
	ClusterName    string
	Node
}

DeleteNodeActivityInput represents the input needed for executing a DeleteNodeActivity

type DeleteNodePoolFromStoreActivity

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

func MakeDeleteNodePoolFromStoreActivity

func MakeDeleteNodePoolFromStoreActivity(store pke.ClusterStore) DeleteNodePoolFromStoreActivity

func (DeleteNodePoolFromStoreActivity) Execute

func (a DeleteNodePoolFromStoreActivity) Execute(ctx context.Context, input DeleteNodePoolFromStoreActivityInput) error

type DeleteNodePoolFromStoreActivityInput

type DeleteNodePoolFromStoreActivityInput struct {
	ClusterID    uint
	NodePoolName string
}

type DeleteNodePoolWorkflowInput

type DeleteNodePoolWorkflowInput struct {
	ClusterID      uint
	ClusterName    string
	OrganizationID uint
	SecretID       string
	K8sSecretID    string
	NodePool       NodePool
}

DeleteNodePoolWorkflowInput

type GetPublicAddressActivity

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

GetPublicAddressActivity represents an activity to retrieve cluster public address

func MakeGetPublicAddressActivity

func MakeGetPublicAddressActivity(vmomiClientFactory *VMOMIClientFactory) GetPublicAddressActivity

MakeGetPublicAddressActivity returns a new GetPublicAddressActivity

func (GetPublicAddressActivity) Execute

func (a GetPublicAddressActivity) Execute(ctx context.Context, input GetPublicAddressActivityInput) (ipAddress string, err error)

Execute performs the activity In case of success, it returns whether the given node existed or not.

type GetPublicAddressActivityInput

type GetPublicAddressActivityInput struct {
	OrganizationID uint
	SecretID       string
	NodeName       string
}

GetPublicAddressActivityInput represents the input needed for executing a GetPublicAddressActivity

type K8sConfigGetter

type K8sConfigGetter interface {
	Get(organizationID uint, k8sSecretID string) ([]byte, error)
}

type Node

type Node struct {
	AdminUsername          string
	VCPU                   int
	RAM                    int // MiB
	Name                   string
	SSHPublicKey           string
	UserDataScriptParams   map[string]string
	UserDataScriptTemplate string
	TemplateName           string
	NodePoolName           string
	Master                 bool
}

Node represents a vSphere virtual machine

type NodePool

type NodePool struct {
	Name string
	Size int
}

type SetClusterStatusActivity

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

func MakeSetClusterStatusActivity

func MakeSetClusterStatusActivity(store pke.ClusterStore) SetClusterStatusActivity

func (SetClusterStatusActivity) Execute

func (a SetClusterStatusActivity) Execute(ctx context.Context, input SetClusterStatusActivityInput) error

type SetClusterStatusActivityInput

type SetClusterStatusActivityInput struct {
	ClusterID     uint
	Status        string
	StatusMessage string
}

type UpdateClusterWorkflowInput

type UpdateClusterWorkflowInput struct {
	ClusterID         uint
	ClusterName       string
	ClusterUID        string
	OrganizationID    uint
	OrganizationName  string
	ResourcePoolName  string
	FolderName        string
	DatastoreName     string
	SecretID          string
	StorageSecretID   string
	K8sSecretID       string
	OIDCEnabled       bool
	MasterNodeNames   []string
	NodesToCreate     []Node
	NodesToDelete     []Node
	NodePoolsToDelete []NodePool
	HTTPProxy         intPKE.HTTPProxy
	NodePoolLabels    map[string]map[string]string
}

UpdateClusterWorkflowInput

type VMOMIClientFactory

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

func NewVMOMIClientFactory

func NewVMOMIClientFactory(secretStore pkeworkflow.SecretStore) *VMOMIClientFactory

func (*VMOMIClientFactory) New

func (f *VMOMIClientFactory) New(organizationID uint, secretID string) (*govmomi.Client, error)

type WaitForIPActivity

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

WaitForIPActivity represents an activity for creating a vSphere virtual machine

func MakeWaitForIPActivity

func MakeWaitForIPActivity(vmomiClientFactory *VMOMIClientFactory) WaitForIPActivity

MakeWaitForIPActivity returns a new WaitForIPActivity

func (WaitForIPActivity) Execute

func (a WaitForIPActivity) Execute(ctx context.Context, input WaitForIPActivityInput) (string, error)

Execute performs the activity

type WaitForIPActivityInput

type WaitForIPActivityInput struct {
	Ref            types.ManagedObjectReference
	OrganizationID uint
	SecretID       string
	ClusterName    string
}

WaitForIPActivityInput represents the input needed for executing a WaitForIPActivity

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier