instance

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Types
	Stage                        = "Stage"
	DeploymentTemplateChecksum   = "TemplateChecksum"
	DeploymentParametersChecksum = "ParametersChecksum"

	// States
	ClusterUpgradeRequirementCheck = "ClusterUpgradeRequirementCheck"
	CordonOldWorkers               = "CordonOldWorkers"
	DeploymentUninitialized        = ""
	DeploymentInitialized          = "DeploymentInitialized"
	DeploymentCompleted            = "DeploymentCompleted"
	DrainOldWorkerNodes            = "DrainOldWorkerNodes"
	MasterInstancesUpgrading       = "MasterInstancesUpgrading"
	ProvisioningSuccessful         = "ProvisioningSuccessful"
	ScaleUpWorkerVMSS              = "ScaleUpWorkerVMSS"
	ScaleDownWorkerVMSS            = "ScaleDownWorkerVMSS"
	TerminateOldWorkerInstances    = "TerminateOldWorkerInstances"
	WaitForMastersToBecomeReady    = "WaitForMastersToBecomeReady"
	WaitForWorkersToBecomeReady    = "WaitForWorkersToBecomeReady"
)
View Source
const (
	Name = "instance"
)
View Source
const (
	// UnschedulablePatch is the JSON patch structure being applied to nodes using
	// a strategic merge patch in order to cordon them.
	UnschedulablePatch = `{"spec":{"unschedulable":true}}`
)

Variables

This section is empty.

Functions

func IsClientNotFound

func IsClientNotFound(err error) bool

IsClientNotFound asserts clientNotFoundError.

func IsDeploymentNotFound

func IsDeploymentNotFound(err error) bool

IsDeploymentNotFound asserts deploymentNotFoundError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsMissingLabel

func IsMissingLabel(err error) bool

IsMissingLabel asserts missingLabelError.

func IsNilTemplateLinkError

func IsNilTemplateLinkError(err error) bool

func IsScaleSetNotFound

func IsScaleSetNotFound(err error) bool

IsScaleSetNotFound asserts scaleSetNotFoundError.

func IsUnableToGetTemplateError

func IsUnableToGetTemplateError(err error) bool

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. Once all instances are Upgraded the state becomes DeploymentCompleted and the reconciliation loop stops until a change in the ARM template or parameters is detected. Check docs/instances-stages-v13.svg file for a grafical representation of this process.

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.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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