eksworkflow

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const ErrReasonStackFailed = "CLOUDFORMATION_STACK_FAILED"

ErrReasonStackFailed cadence custom error reason that denotes a stack operation that resulted a stack failure TODO: this is temporary

View Source
const UpdateAddonActivityName = "eks-update-addon"
View Source
const UpdateClusterVersionActivityName = "eks-update-version"
View Source
const UpdateClusterWorkflowName = "eks-update-cluster-v2"
View Source
const UpdateNodeGroupActivityName = "eks-update-node-group"
View Source
const UpdateNodePoolWorkflowName = "eks-update-node-pool"
View Source
const WaitCloudFormationStackUpdateActivityName = "eks-wait-cloudformation-stack-update"
View Source
const WaitUpdateAddonActivityName = "eks-wait-update-addon"
View Source
const WaitUpdateClusterVersionActivityName = "eks-wait-update-version"

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSSessionFactory

type AWSSessionFactory interface {
	// NewSession creates an AWS session.
	NewSession(secretID string, region string) (*session.Session, error)
}

AWSSessionFactory creates an AWS session.

type UpdateAddonActivity

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

UpdateAddonActivity responsible for updating an EKS addon Addon is updated only in case it's already enable on cluster and there's a newer version available for given Kubernetes version.

func NewUpdateAddonActivity

func NewUpdateAddonActivity(
	awsSessionFactory awsworkflow.AWSFactory, eksFactory workflow.EKSAPIFactory,
) *UpdateAddonActivity

NewUpdateAddonActivity instantiates a new EKS addon version update

func (*UpdateAddonActivity) Execute

func (UpdateAddonActivity) Register

func (a UpdateAddonActivity) Register(worker worker.Registry)

Register registers the activity in the worker.

type UpdateAddonActivityInput

type UpdateAddonActivityInput struct {
	OrganizationID    uint
	ProviderSecretID  string
	Region            string
	ClusterID         uint
	ClusterName       string
	KubernetesVersion string

	AddonName                    string
	UpgradeAtMostOneMinorVersion bool
}

UpdateAddonActivityInput holds data needed for updating an EKS addon

type UpdateAddonActivityOutput

type UpdateAddonActivityOutput struct {
	UpdateID                           string
	AddonNotInstalled                  bool
	IsLatestCompatibleVersionInstalled bool
}

UpdateAddonActivityOutput holds the output data of the UpdateAddonActivityOutput

type UpdateClusterVersionActivity

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

UpdateClusterVersionActivity responsible for updating an EKS cluster

func NewUpdateClusterVersionActivity

func NewUpdateClusterVersionActivity(
	awsSessionFactory awsworkflow.AWSFactory, eksFactory workflow.EKSAPIFactory,
) *UpdateClusterVersionActivity

NewUpdateClusterVersionActivity instantiates a new EKS version update

func (UpdateClusterVersionActivity) Register

func (a UpdateClusterVersionActivity) Register(worker worker.Registry)

Register registers the activity in the worker.

type UpdateClusterVersionActivityInput

type UpdateClusterVersionActivityInput struct {
	OrganizationID   uint
	ProviderSecretID string
	Region           string
	ClusterID        uint
	ClusterName      string

	Version string
}

UpdateClusterVersionActivityInput holds data needed for updating an EKS cluster

type UpdateClusterVersionActivityOutput

type UpdateClusterVersionActivityOutput struct {
	UpdateID string
}

UpdateClusterVersionActivityOutput holds the output data of the UpdateEKSVersionActivityOutput

type UpdateClusterWorkflow

type UpdateClusterWorkflow struct{}

func NewUpdateClusterWorkflow

func NewUpdateClusterWorkflow() UpdateClusterWorkflow

func (UpdateClusterWorkflow) Execute

Execute executes the Cadence workflow responsible for updating EKS cluster version

func (UpdateClusterWorkflow) Register

func (w UpdateClusterWorkflow) Register(worker worker.Registry)

Register registers the activity in the worker.

type UpdateClusterWorkflowInput

type UpdateClusterWorkflowInput struct {
	Region           string
	OrganizationID   uint
	ProviderSecretID string
	ConfigSecretID   string

	ClusterID   uint
	ClusterName string

	Version string
}

UpdateClusterWorkflowInput holds data needed to update EKS cluster version

type UpdateNodeGroupActivity

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

UpdateNodeGroupActivity updates an existing node group.

func NewUpdateNodeGroupActivity

func NewUpdateNodeGroupActivity(
	sessionFactory AWSSessionFactory,
	cloudFormationTemplate string,
	defaultNodeVolumeEncryption *eks.NodePoolVolumeEncryption,
) UpdateNodeGroupActivity

NewUpdateNodeGroupActivity creates a new UpdateNodeGroupActivity instance.

func (UpdateNodeGroupActivity) Execute

Execute is the main body of the activity, returns true if there was any update and that was successful.

func (UpdateNodeGroupActivity) Register

func (a UpdateNodeGroupActivity) Register(worker worker.Registry)

Register registers the activity in the worker.

type UpdateNodeGroupActivityInput

type UpdateNodeGroupActivityInput struct {
	SecretID string
	Region   string

	ClusterName string

	StackName string

	NodePoolName    string
	NodePoolVersion string

	NodeVolumeEncryption *eks.NodePoolVolumeEncryption
	NodeVolumeSize       int
	NodeVolumeType       string
	NodeImage            string
	DesiredCapacity      int64
	SecurityGroups       []string
	UseInstanceStore     *bool

	MaxBatchSize          int
	MinInstancesInService int

	ClusterTags map[string]string

	CurrentTemplateVersion semver.Version
}

UpdateNodeGroupActivityInput holds the parameters for the node group update.

type UpdateNodeGroupActivityOutput

type UpdateNodeGroupActivityOutput struct {
	NodePoolChanged bool
}

type UpdateNodePoolWorkflow

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

func NewUpdateNodePoolWorkflow

func NewUpdateNodePoolWorkflow(
	awsFactory awsworkflow.AWSFactory,
	cloudFormationFactory awsworkflow.CloudFormationAPIFactory,
	processLogger processlog.ProcessLogger,
) UpdateNodePoolWorkflow

NewUpdateNodePoolWorkflow returns a new UpdateNodePoolWorkflow.

func (UpdateNodePoolWorkflow) Execute

func (UpdateNodePoolWorkflow) Register

func (w UpdateNodePoolWorkflow) Register(worker worker.Registry)

type UpdateNodePoolWorkflowInput

type UpdateNodePoolWorkflowInput struct {
	ProviderSecretID string
	Region           string

	StackName string

	OrganizationID  uint
	ClusterID       uint
	ClusterSecretID string
	ClusterName     string
	NodePoolName    string

	NodeVolumeEncryption *eks.NodePoolVolumeEncryption
	NodeVolumeSize       int
	NodeVolumeType       string
	NodeImage            string
	SecurityGroups       []string
	UseInstanceStore     *bool

	Options eks.NodePoolUpdateOptions

	ClusterTags map[string]string
}

type WaitCloudFormationStackUpdateActivity

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

WaitCloudFormationStackUpdateActivity updates an existing node group.

func NewWaitCloudFormationStackUpdateActivity

func NewWaitCloudFormationStackUpdateActivity(sessionFactory AWSSessionFactory) WaitCloudFormationStackUpdateActivity

NewWaitCloudFormationStackUpdateActivity creates a new WaitCloudFormationStackUpdateActivity instance.

func (WaitCloudFormationStackUpdateActivity) Execute

Execute is the main body of the activity.

func (WaitCloudFormationStackUpdateActivity) Register

Register registers the activity in the worker.

type WaitCloudFormationStackUpdateActivityInput

type WaitCloudFormationStackUpdateActivityInput struct {
	SecretID  string
	Region    string
	StackName string
}

WaitCloudFormationStackUpdateActivityInput holds the parameters for the node group update.

type WaitUpdateAddonActivity

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

WaitUpdateAddonActivity responsible for updating an EKS addon

func NewWaitUpdateAddonActivity

func NewWaitUpdateAddonActivity(
	awsSessionFactory awsworkflow.AWSFactory, eksFactory workflow.EKSAPIFactory,
) *WaitUpdateAddonActivity

NewWaitUpdateAddonActivity instantiates a new EKS addon update waiting activity

func (*WaitUpdateAddonActivity) Execute

func (WaitUpdateAddonActivity) Register

func (a WaitUpdateAddonActivity) Register(worker worker.Registry)

Register registers the activity in the worker.

type WaitUpdateAddonActivityInput

type WaitUpdateAddonActivityInput struct {
	Region           string
	OrganizationID   uint
	ProviderSecretID string
	ClusterName      string
	AddonName        string

	UpdateID string
}

WaitUpdateAddonActivityInput holds data needed for waiting for an EKS addon update

type WaitUpdateClusterVersionActivity

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

WaitUpdateClusterVersionActivity responsible for updating an EKS cluster

func NewWaitUpdateClusterVersionActivity

func NewWaitUpdateClusterVersionActivity(
	awsSessionFactory awsworkflow.AWSFactory, eksFactory workflow.EKSAPIFactory,
) *WaitUpdateClusterVersionActivity

NewWaitUpdateClusterVersionActivity instantiates a new EKS version update waiting activity

func (*WaitUpdateClusterVersionActivity) Execute

func (WaitUpdateClusterVersionActivity) Register

Register registers the activity in the worker.

type WaitUpdateClusterVersionActivityInput

type WaitUpdateClusterVersionActivityInput struct {
	Region           string
	OrganizationID   uint
	ProviderSecretID string
	ClusterName      string

	UpdateID string
}

WaitUpdateClusterVersionActivityInput holds data needed for waiting for an EKS cluster update

Jump to

Keyboard shortcuts

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