detection

package
v5.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Config

type Config struct {
	Logger micrologger.Logger
}

type Detection

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

Detection is a service implementation deciding if a tenant cluster should be updated or scaled.

func New

func New(config Config) (*Detection, error)

func (*Detection) ShouldScale

func (d *Detection) ShouldScale(ctx context.Context, cr v1alpha1.AWSConfig) (bool, error)

ShouldScale determines whether the reconciled tenant cluster should be scaled. A tenant cluster is only allowed to scale in the following cases.

The tenant cluster's scaling max changes.
The tenant cluster's scaling min changes.

func (*Detection) ShouldUpdate

func (d *Detection) ShouldUpdate(ctx context.Context, cr v1alpha1.AWSConfig) (bool, error)

ShouldUpdate determines whether the reconciled tenant cluster should be updated. A tenant cluster is only allowed to update in the following cases.

The master node's instance type changes.
The worker node's docker volume size changes.
The worker node's instance type changes.
The tenant cluster's version changes.

Jump to

Keyboard shortcuts

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