Documentation
¶
Index ¶
- Constants
- type Hash
- type Hasher
- type Upgrade
- func (u *Upgrade) CreateOrUpdateConfigStorageAccount(ctx context.Context) error
- func (u *Upgrade) CreateOrUpdateSyncPod(ctx context.Context) error
- func (u *Upgrade) EnrichCertificatesFromVault(ctx context.Context) error
- func (u *Upgrade) EnrichStorageAccountKeys(ctx context.Context) error
- func (u *Upgrade) EtcdListBackups(ctx context.Context) ([]storage.Blob, error)
- func (u *Upgrade) EtcdRestoreDeleteMasterScaleSet(ctx context.Context) *api.PluginError
- func (u *Upgrade) EtcdRestoreDeleteMasterScaleSetHashes(ctx context.Context) *api.PluginError
- func (u *Upgrade) GenerateARM(ctx context.Context, backupBlob string, isUpdate bool, suffix string) (map[string]interface{}, error)
- func (u *Upgrade) HealthCheck(ctx context.Context) *api.PluginError
- func (u *Upgrade) InitializeUpdateBlob(suffix string) error
- func (u *Upgrade) ListVMHostnames(ctx context.Context) ([]string, error)
- func (u *Upgrade) Reimage(ctx context.Context, scaleset, instanceID string) error
- func (u *Upgrade) ResetUpdateBlob() error
- func (u *Upgrade) RunCommand(ctx context.Context, scaleset, instanceID, command string) error
- func (u *Upgrade) SortedAgentPoolProfilesForRole(role api.AgentPoolProfileRole) (apps []api.AgentPoolProfile)
- func (u *Upgrade) UpdateMasterAgentPool(ctx context.Context, app *api.AgentPoolProfile) *api.PluginError
- func (u *Upgrade) UpdateWorkerAgentPool(ctx context.Context, app *api.AgentPoolProfile, suffix string) *api.PluginError
- func (u *Upgrade) WaitForHealthzStatusOk(ctx context.Context) error
- func (u *Upgrade) WaitForNodesInAgentPoolProfile(ctx context.Context, app *api.AgentPoolProfile, suffix string) error
- func (u *Upgrade) WriteStartupBlobs() error
- type Upgrader
Constants ¶
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 ¶
type Upgrade struct {
kubeclient.Interface
TestConfig api.TestConfig
AccountsClient storage.AccountsClient
StorageClient storage.Client
UpdateBlobService updateblob.BlobService
Vmc compute.VirtualMachineScaleSetVMsClient
Ssc compute.VirtualMachineScaleSetsClient
Kvc keyvault.KeyVaultClient
Log *logrus.Entry
ScalerFactory scaler.Factory
Hasher Hasher
Arm arm.Interface
Cs *api.OpenShiftManagedCluster
GetConsoleClient func(cs *api.OpenShiftManagedCluster) wait.SimpleHTTPClient
GetAPIServerClient func(cs *api.OpenShiftManagedCluster) wait.SimpleHTTPClient
}
func (*Upgrade) CreateOrUpdateConfigStorageAccount ¶
func (*Upgrade) CreateOrUpdateSyncPod ¶
CreateOrUpdateSyncPod creates or updates the sync pod.
func (*Upgrade) EnrichCertificatesFromVault ¶
func (*Upgrade) EnrichStorageAccountKeys ¶
func (*Upgrade) EtcdListBackups ¶
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 (*Upgrade) HealthCheck ¶
func (u *Upgrade) HealthCheck(ctx context.Context) *api.PluginError
HealthCheck function to verify cluster health
func (*Upgrade) InitializeUpdateBlob ¶
func (*Upgrade) ListVMHostnames ¶
func (*Upgrade) ResetUpdateBlob ¶
func (*Upgrade) RunCommand ¶
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) 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 (*Upgrade) WaitForNodesInAgentPoolProfile ¶
func (*Upgrade) WriteStartupBlobs ¶
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
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