Documentation
¶
Index ¶
- func GetUpgradeInstructions(obj client.Object) string
- func IsMachineUpgradeFailed(m *clusterv1.Machine) bool
- func IsMachineUpgrading(m *clusterv1.Machine) bool
- func IsUpgraded(obj client.Object, release string) bool
- func MarkMachineToUpgrade(ctx context.Context, m *clusterv1.Machine, to string, c client.Client) error
- func MarkUpgradeDone(ctx context.Context, obj client.Object, to string, patcher Patcher) error
- func MarkUpgradeFailed(ctx context.Context, obj client.Object, patcher Patcher) error
- func MarkUpgradeInProgress(ctx context.Context, obj client.Object, to string, patcher Patcher) error
- func NewUpgradeLock(c client.Client) *upgradeLock
- type MachineGetter
- type Patcher
- type UpgradeLock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUpgradeInstructions ¶
GetUpgradeInstructions returns the in-place upgrade instructions set on the object.
func IsMachineUpgradeFailed ¶
IsMachineUpgradeFailed checks if the machine upgrade failed. The upgrade might be getting retried at the moment of the check. This check insures that the upgrade failed *at some point*.
func IsMachineUpgrading ¶
IsMachineUpgrading checks if the object is upgrading.
func IsUpgraded ¶
IsUpgraded checks if the object is already upgraded to the specified release.
func MarkMachineToUpgrade ¶
func MarkMachineToUpgrade(ctx context.Context, m *clusterv1.Machine, to string, c client.Client) error
MarkMachineToUpgrade marks the machine to upgrade.
func MarkUpgradeDone ¶
MarkUpgradeDone annotates the object with in-place upgrade done.
func MarkUpgradeFailed ¶
MarkUpgradeFailed annotates the object with in-place upgrade failed.
func MarkUpgradeInProgress ¶
func MarkUpgradeInProgress(ctx context.Context, obj client.Object, to string, patcher Patcher) error
MarkUpgradeInProgress annotates the object with in-place upgrade in-progress.
func NewUpgradeLock ¶
Types ¶
type MachineGetter ¶
type MachineGetter interface {
GetMachinesForCluster(ctx context.Context, cluster client.ObjectKey, filters ...collections.Func) (collections.Machines, error)
}
MachineGetter is an interface that defines the methods used to get machines.
type Patcher ¶
type Patcher interface {
Patch(ctx context.Context, obj client.Object, opts ...patch.Option) error
}
Patcher is an interface that knows how to patch an object.
type UpgradeLock ¶
type UpgradeLock interface { // IsLocked checks if the upgrade process is locked and (if locked) returns the machine that the process is locked for. IsLocked(ctx context.Context, cluster *clusterv1.Cluster) (*clusterv1.Machine, error) // Lock is a non-blocking call that tries to lock the upgrade process for the given machine. Lock(ctx context.Context, cluster *clusterv1.Cluster, m *clusterv1.Machine) error // Unlock unlocks the upgrade process. Unlock(ctx context.Context, cluster *clusterv1.Cluster) error }
UpgradeLock is an interface that defines the methods used to lock and unlock the inplace upgrade process.