cluster

package
v10.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 30 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ConfigContainerName     = "config"
	SyncBlobName            = "sync"
	MasterStartupBlobName   = "master-startup"
	WorkerStartupBlobName   = "worker-startup"
	EtcdBackupContainerName = "etcd"
)

here follow well known container and blob names

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash struct {
	Log            *logrus.Entry
	TestConfig     api.TestConfig
	StartupFactory func(*logrus.Entry, *api.OpenShiftManagedCluster, api.TestConfig) (startup.Interface, error)
	Arm            arm.Interface
}

func (*Hash) HashScaleSet

func (h *Hash) HashScaleSet(cs *api.OpenShiftManagedCluster, app *api.AgentPoolProfile) ([]byte, error)

HashScaleSet returns the hash of a scale set

func (*Hash) HashSyncPod

func (h *Hash) HashSyncPod(cs *api.OpenShiftManagedCluster) ([]byte, error)

HashSyncPod returns the hash of the sync pod output

type Hasher

type Hasher interface {
	HashScaleSet(*api.OpenShiftManagedCluster, *api.AgentPoolProfile) ([]byte, error)
	HashSyncPod(cs *api.OpenShiftManagedCluster) ([]byte, error)
}

type Upgrade

func (*Upgrade) CreateOrUpdateConfigStorageAccount

func (u *Upgrade) CreateOrUpdateConfigStorageAccount(ctx context.Context) error

CreateOrUpdateConfigStorageAccount creates a new storage account for config if missing

func (*Upgrade) CreateOrUpdateSyncPod

func (u *Upgrade) CreateOrUpdateSyncPod(ctx context.Context) error

CreateOrUpdateSyncPod creates or updates the sync pod.

func (*Upgrade) EnrichCertificatesFromVault

func (u *Upgrade) EnrichCertificatesFromVault(ctx context.Context) error

func (*Upgrade) EnrichStorageAccountKeys

func (u *Upgrade) EnrichStorageAccountKeys(ctx context.Context) error

func (*Upgrade) EtcdListBackups

func (u *Upgrade) EtcdListBackups(ctx context.Context) ([]storage.Blob, error)

func (*Upgrade) EtcdRestoreDeleteMasterScaleSet

func (u *Upgrade) EtcdRestoreDeleteMasterScaleSet(ctx context.Context) *api.PluginError

func (*Upgrade) EtcdRestoreDeleteMasterScaleSetHashes

func (u *Upgrade) EtcdRestoreDeleteMasterScaleSetHashes(ctx context.Context) *api.PluginError

func (*Upgrade) GenerateARM

func (u *Upgrade) GenerateARM(ctx context.Context, backupBlob string, isUpdate bool, suffix string) (map[string]interface{}, error)

func (*Upgrade) HealthCheck

func (u *Upgrade) HealthCheck(ctx context.Context) *api.PluginError

HealthCheck function to verify cluster health

func (*Upgrade) InitializeUpdateBlob

func (u *Upgrade) InitializeUpdateBlob(suffix string) error

InitializeUpdateBlob hashes the cluster values and stores them in blobs

func (*Upgrade) ListVMHostnames

func (u *Upgrade) ListVMHostnames(ctx context.Context) ([]string, error)

func (*Upgrade) Reimage

func (u *Upgrade) Reimage(ctx context.Context, scaleset, instanceID string) error

func (*Upgrade) ResetUpdateBlob

func (u *Upgrade) ResetUpdateBlob() error

ResetUpdateBlob resets the update blob to its initial (default) state

func (*Upgrade) RunCommand

func (u *Upgrade) RunCommand(ctx context.Context, scaleset, instanceID, command string) error

func (*Upgrade) SortedAgentPoolProfilesForRole

func (u *Upgrade) SortedAgentPoolProfilesForRole(role api.AgentPoolProfileRole) (apps []api.AgentPoolProfile)

SortedAgentPoolProfilesForRole returns a shallow copy of the AgentPoolProfiles of a given role, sorted by name

func (*Upgrade) UpdateMasterAgentPool

func (u *Upgrade) UpdateMasterAgentPool(ctx context.Context, app *api.AgentPoolProfile) *api.PluginError

UpdateMasterAgentPool updates one by one all the VMs of the master scale set, in place.

func (*Upgrade) UpdateMasterAgentPoolTogether

func (u *Upgrade) UpdateMasterAgentPoolTogether(ctx context.Context, app *api.AgentPoolProfile) *api.PluginError

UpdateMasterAgentPoolTogether updates in-parallel all the VMs of the master scale set, in place.

func (*Upgrade) UpdateWorkerAgentPool

func (u *Upgrade) UpdateWorkerAgentPool(ctx context.Context, app *api.AgentPoolProfile, suffix string) *api.PluginError

updateWorkerAgentPool updates one by one all the VMs of a worker agent pool. It defines a "target" scale set, which is known to be up-to-date because its hash matches desiredHash. The goal is for the correct number of instances to be running in the "target" scale set. In update scenarios, there will be a "source" scale set which contains out-of-date instances (in crash recovery scenarios, there could be multiple of these).

func (*Upgrade) WaitForHealthzStatusOk

func (u *Upgrade) WaitForHealthzStatusOk(ctx context.Context) error

func (*Upgrade) WaitForNodesInAgentPoolProfile

func (u *Upgrade) WaitForNodesInAgentPoolProfile(ctx context.Context, app *api.AgentPoolProfile, suffix string) error

func (*Upgrade) WriteStartupBlobs

func (u *Upgrade) WriteStartupBlobs() error

WriteStartupBlobs writes the blobs to the SA for all agent pool profiles

type Upgrader

type Upgrader interface {
	CreateOrUpdateConfigStorageAccount(ctx context.Context) error
	EnrichCertificatesFromVault(ctx context.Context) error
	EnrichStorageAccountKeys(ctx context.Context) error
	InitializeUpdateBlob(suffix string) error
	WaitForHealthzStatusOk(ctx context.Context) error
	HealthCheck(ctx context.Context) *api.PluginError
	SortedAgentPoolProfilesForRole(role api.AgentPoolProfileRole) []api.AgentPoolProfile
	WaitForNodesInAgentPoolProfile(ctx context.Context, app *api.AgentPoolProfile, suffix string) error
	UpdateMasterAgentPool(ctx context.Context, app *api.AgentPoolProfile) *api.PluginError
	UpdateMasterAgentPoolTogether(ctx context.Context, app *api.AgentPoolProfile) *api.PluginError
	UpdateWorkerAgentPool(ctx context.Context, app *api.AgentPoolProfile, suffix string) *api.PluginError
	CreateOrUpdateSyncPod(ctx context.Context) error
	EtcdListBackups(ctx context.Context) ([]azstorage.Blob, error)
	EtcdRestoreDeleteMasterScaleSet(ctx context.Context) *api.PluginError
	EtcdRestoreDeleteMasterScaleSetHashes(ctx context.Context) *api.PluginError
	ResetUpdateBlob() error
	Reimage(ctx context.Context, scaleset, instanceID string) error
	ListVMHostnames(ctx context.Context) ([]string, error)
	RunCommand(ctx context.Context, scaleset, instanceID, command string) error
	WriteStartupBlobs() error
	GenerateARM(ctx context.Context, backupBlob string, isUpdate bool, suffix string) (map[string]interface{}, error)

	kubeclient.Interface
}

Upgrader is the public interface to the upgrade module used by the plugin.

func NewSimpleUpgrader

func NewSimpleUpgrader(ctx context.Context, log *logrus.Entry, cs *api.OpenShiftManagedCluster, initializeStorageClients, disableKeepAlives bool, testConfig api.TestConfig) (Upgrader, error)

NewSimpleUpgrader creates a new upgrader instance

Source Files

  • admin_actions.go
  • etcdrestore.go
  • hash.go
  • healthcheck.go
  • initialize.go
  • ready.go
  • types.go
  • update_master.go
  • update_syncpod.go
  • update_worker.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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