instance

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DeploymentInitialized  = "DeploymentInitialized"
	InstancesUpgrading     = "InstancesUpgrading"
	ProvisioningSuccessful = "ProvisioningSuccessful"
)
View Source
const (
	Name = "instancev7"
)
View Source
const (
	Stage = "Stage"
)

Variables

This section is empty.

Functions

func IsDeploymentNotFound

func IsDeploymentNotFound(err error) bool

IsDeploymentNotFound asserts deploymentNotFoundError.

func IsExecutionFailed

func IsExecutionFailed(err error) bool

IsExecutionFailed asserts executionFailedError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsMissingLabel

func IsMissingLabel(err error) bool

IsMissingLabel asserts missingLabelError.

func IsScaleSetNotFound

func IsScaleSetNotFound(err error) bool

IsScaleSetNotFound asserts scaleSetNotFoundError.

func IsVersionBlobEmpty

func IsVersionBlobEmpty(err error) bool

IsVersionBlobEmpty asserts versionBlobEmptyError.

Types

type Config

type Config struct {
	Debugger  *debugger.Debugger
	G8sClient versioned.Interface
	K8sClient kubernetes.Interface
	Logger    micrologger.Logger

	Azure           setting.Azure
	TemplateVersion string
}

type Resource

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

func New

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

func (*Resource) EnsureCreated

func (r *Resource) EnsureCreated(ctx context.Context, obj interface{}) error

EnsureCreated operates in 3 different stages which are executed sequentially. The first stage is for uploading ARM templates and is represented by stage DeploymentInitialized. The second stage is for waiting for ARM templates to be applied and is represented by stage ProvisioningSuccessful. the third stage is for draining and upgrading the VMSS instances and is represented by stage InstancesUpgrading. The stages are executed one after another and the instance resource cycles through them reliably until all necessary upgrade steps are successfully processed.

func (*Resource) EnsureDeleted

func (r *Resource) EnsureDeleted(ctx context.Context, obj interface{}) error

func (*Resource) Name

func (r *Resource) Name() string

type SmallCloudconfigConfig

type SmallCloudconfigConfig struct {
	BlobURL       string
	CertsFiles    certs.Files
	EncryptionKey string
	InitialVector string
	InstanceRole  string
}

SmallCloudconfigConfig represents the data structure required for executing the small cloudconfig template.

Jump to

Keyboard shortcuts

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