Documentation ¶
Index ¶
- func CheckControlPlaneMachineOnDeleteReplacement(testFramework framework.Framework, idx int, ctx context.Context) bool
- func CheckControlPlaneMachineRollingReplacement(testFramework framework.Framework, idx int, ctx context.Context) bool
- func CheckReplicasDoesNotExceedSurgeCapacity(ctx context.Context) bool
- func CheckRolloutForIndex(testFramework framework.Framework, ctx context.Context, idx int, ...) bool
- func ConsistentlyControlPlaneMachinesWithoutDeletionTimestamp(testFramework framework.Framework)
- func DeleteControlPlaneMachineSet(testFramework framework.Framework, ctx context.Context, ...)
- func EnsureActiveControlPlaneMachineSet(testFramework framework.Framework, gomegaArgs ...interface{})
- func EnsureControlPlaneMachineSetDeleted(testFramework framework.Framework)
- func EnsureControlPlaneMachineSetUpdateStrategy(testFramework framework.Framework, ...) machinev1.ControlPlaneMachineSetStrategyType
- func EnsureControlPlaneMachineSetUpdated(testFramework framework.Framework)
- func EnsureInactiveControlPlaneMachineSet(testFramework framework.Framework, gomegaArgs ...interface{})
- func EventuallyClusterOperatorsShouldStabilise(gomegaArgs ...interface{})
- func EventuallyIndexIsBeingReplaced(ctx context.Context, testFramework framework.Framework, idx int) bool
- func ExpectControlPlaneMachineSetToBeActive(testFramework framework.Framework)
- func ExpectControlPlaneMachineSetToBeInactive(testFramework framework.Framework)
- func ExpectControlPlaneMachineSetToBeInactiveOrNotFound(testFramework framework.Framework)
- func ExpectControlPlaneMachinesAllRunning(testFramework framework.Framework)
- func ExpectControlPlaneMachinesNotOwned(testFramework framework.Framework)
- func ExpectControlPlaneMachinesOwned(testFramework framework.Framework)
- func ExpectControlPlaneMachinesWithoutDeletionTimestamp(testFramework framework.Framework)
- func GetControlPlaneMachineSetUID(testFramework framework.Framework) types.UID
- func IncreaseControlPlaneMachineInstanceSize(testFramework framework.Framework, index int, gomegaArgs ...interface{}) (machinev1beta1.ProviderSpec, machinev1beta1.ProviderSpec)
- func IncreaseControlPlaneMachineSetInstanceSize(testFramework framework.Framework, gomegaArgs ...interface{}) machinev1beta1.ProviderSpec
- func IncreaseNewestControlPlaneMachineInstanceSize(testFramework framework.Framework, gomegaArgs ...interface{}) (int, machinev1beta1.ProviderSpec, machinev1beta1.ProviderSpec)
- func ItShouldCheckAllControlPlaneMachinesHaveCorrectOwnerReferences(testFramework framework.Framework)
- func ItShouldHaveAnActiveControlPlaneMachineSet(testFramework framework.Framework)
- func ItShouldHaveTheControlPlaneMachineSetReplicasUpdated(testFramework framework.Framework)
- func ItShouldNotCauseARollout(testFramework framework.Framework)
- func ItShouldNotOnDeleteReplaceTheOutdatedMachine(testFramework framework.Framework, index int)
- func ItShouldOnDeleteReplaceTheOutDatedMachineWhenDeleted(testFramework framework.Framework, index int)
- func ItShouldPerformARollingUpdate(opts *RollingUpdatePeriodicTestOptions)
- func ItShouldPerformControlPlaneMachineSetRegeneration(opts *ControlPlaneMachineSetRegenerationTestOptions, gomegaArgs ...interface{})
- func ItShouldRollingUpdateReplaceTheOutdatedMachine(testFramework framework.Framework, index int)
- func ItShouldUninstallTheControlPlaneMachineSet(testFramework framework.Framework)
- func UpdateControlPlaneMachineProviderSpec(testFramework framework.Framework, index int, ...)
- func UpdateControlPlaneMachineSetProviderSpec(testFramework framework.Framework, ...)
- func UpdateDefaultedValueFromControlPlaneMachineSetProviderConfig(testFramework framework.Framework, gomegaArgs ...interface{}) machinev1beta1.ProviderSpec
- func WaitForControlPlaneMachineSetDesiredReplicas(ctx context.Context, cpms *machinev1.ControlPlaneMachineSet) bool
- func WaitForControlPlaneMachineSetRemovedOrRecreated(ctx context.Context, testFramework framework.Framework, oldCPMSUID types.UID) bool
- type ControlPlaneMachineSetRegenerationTestOptions
- type RollingUpdatePeriodicTestOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckControlPlaneMachineOnDeleteReplacement ¶
func CheckControlPlaneMachineOnDeleteReplacement(testFramework framework.Framework, idx int, ctx context.Context) bool
CheckControlPlaneMachineOnDeleteReplacement checks that the machines with the given index are being replaced in a on delete style with the expected conditions. This function explicitly takes a context which is expected to have a timeout in the parent scope.
func CheckControlPlaneMachineRollingReplacement ¶
func CheckControlPlaneMachineRollingReplacement(testFramework framework.Framework, idx int, ctx context.Context) bool
CheckControlPlaneMachineRollingReplacement checks that the machines with the given index are being replaced in a rolling update style with the expected conditions. This function explicitly takes a context which is expected to have a timeout in the parent scope.
func CheckReplicasDoesNotExceedSurgeCapacity ¶
CheckReplicasDoesNotExceedSurgeCapacity checks that, during a rolling update, the number of replicas within the control plane machine set never exceeds the desired number of replicas plus 1 additional machine for surge.
func CheckRolloutForIndex ¶
func CheckRolloutForIndex(testFramework framework.Framework, ctx context.Context, idx int, strategy machinev1.ControlPlaneMachineSetStrategyType) bool
CheckRolloutForIndex first checks that a new machine is created in the correct index, and then checks that the new machine in the index is replaced correctly.
func ConsistentlyControlPlaneMachinesWithoutDeletionTimestamp ¶
ConsistentlyControlPlaneMachinesWithoutDeletionTimestamp checks that none of the control plane machines have a deletion timestamp, consistently.
func DeleteControlPlaneMachineSet ¶
func DeleteControlPlaneMachineSet(testFramework framework.Framework, ctx context.Context, cpms *machinev1.ControlPlaneMachineSet)
DeleteControlPlaneMachineSet deletes the control plane machine set.
func EnsureActiveControlPlaneMachineSet ¶
func EnsureActiveControlPlaneMachineSet(testFramework framework.Framework, gomegaArgs ...interface{})
EnsureActiveControlPlaneMachineSet ensures that there is an active control plane machine set within the cluster. For fully supported clusters, this means waiting for the control plane machine set to be created and checking that it is active. For manually supported clusters, this means creating the control plane machine set, checking its status and then activating it.
func EnsureControlPlaneMachineSetDeleted ¶
EnsureControlPlaneMachineSetDeleted ensures the control plane machine set is deleted and properly removed/recreated.
func EnsureControlPlaneMachineSetUpdateStrategy ¶
func EnsureControlPlaneMachineSetUpdateStrategy(testFramework framework.Framework, strategy machinev1.ControlPlaneMachineSetStrategyType, gomegaArgs ...interface{}) machinev1.ControlPlaneMachineSetStrategyType
EnsureControlPlaneMachineSetUpdateStrategy ensures that the control plane machine set has the specified update strategy.
func EnsureControlPlaneMachineSetUpdated ¶
EnsureControlPlaneMachineSetUpdated ensures the control plane machine set is up to date.
func EnsureInactiveControlPlaneMachineSet ¶
func EnsureInactiveControlPlaneMachineSet(testFramework framework.Framework, gomegaArgs ...interface{})
EnsureInactiveControlPlaneMachineSet ensures that there is an inactive control plane machine set within the cluster.
func EventuallyClusterOperatorsShouldStabilise ¶
func EventuallyClusterOperatorsShouldStabilise(gomegaArgs ...interface{})
EventuallyClusterOperatorsShouldStabilise checks that the cluster operators stabilise over time. Stabilise means that they are available, are not progressing, and are not degraded.
func EventuallyIndexIsBeingReplaced ¶
func EventuallyIndexIsBeingReplaced(ctx context.Context, testFramework framework.Framework, idx int) bool
EventuallyIndexIsBeingReplaced checks that the index given, eventually receives a replacement Machine. It simultaneously checks that no other index is being replaced, this short circuits what otherwise could be a long wait.
func ExpectControlPlaneMachineSetToBeActive ¶
ExpectControlPlaneMachineSetToBeActive gets the control plane machine set and checks that it is active.
func ExpectControlPlaneMachineSetToBeInactive ¶
ExpectControlPlaneMachineSetToBeInactive gets the control plane machine set and checks that it is active.
func ExpectControlPlaneMachineSetToBeInactiveOrNotFound ¶
ExpectControlPlaneMachineSetToBeInactiveOrNotFound gets the control plane machine set and checks that it is inactive or not found.
func ExpectControlPlaneMachinesAllRunning ¶
ExpectControlPlaneMachinesAllRunning checks that all the control plane machines are in running phase.
func ExpectControlPlaneMachinesNotOwned ¶
ExpectControlPlaneMachinesNotOwned checks that none of the control plane machines have owner references.
func ExpectControlPlaneMachinesOwned ¶
ExpectControlPlaneMachinesOwned checks that all of the control plane machines have owner references.
func ExpectControlPlaneMachinesWithoutDeletionTimestamp ¶
ExpectControlPlaneMachinesWithoutDeletionTimestamp checks that none of the control plane machines has a deletion timestamp.
func GetControlPlaneMachineSetUID ¶
GetControlPlaneMachineSetUID gets the UID of the control plane machine set.
func IncreaseControlPlaneMachineInstanceSize ¶
func IncreaseControlPlaneMachineInstanceSize(testFramework framework.Framework, index int, gomegaArgs ...interface{}) (machinev1beta1.ProviderSpec, machinev1beta1.ProviderSpec)
IncreaseControlPlaneMachineInstanceSize increases the instance size of the control plane machine in the given index. This should trigger the control plane machine set to update the machine in this index based on the update strategy.
func IncreaseControlPlaneMachineSetInstanceSize ¶
func IncreaseControlPlaneMachineSetInstanceSize(testFramework framework.Framework, gomegaArgs ...interface{}) machinev1beta1.ProviderSpec
IncreaseControlPlaneMachineSetInstanceSize increases the instance size of the control plane machine set. This should trigger the control plane machine set to update the machines based on the update strategy.
func IncreaseNewestControlPlaneMachineInstanceSize ¶
func IncreaseNewestControlPlaneMachineInstanceSize(testFramework framework.Framework, gomegaArgs ...interface{}) (int, machinev1beta1.ProviderSpec, machinev1beta1.ProviderSpec)
IncreaseNewestControlPlaneMachineInstanceSize increases the instance size of the the newest control plane machine to match the provider spec given.
func ItShouldCheckAllControlPlaneMachinesHaveCorrectOwnerReferences ¶
func ItShouldCheckAllControlPlaneMachinesHaveCorrectOwnerReferences(testFramework framework.Framework)
ItShouldCheckAllControlPlaneMachinesHaveCorrectOwnerReferences checks that all the control plane machines have the correct owner references set.
func ItShouldHaveAnActiveControlPlaneMachineSet ¶
ItShouldHaveAnActiveControlPlaneMachineSet returns an It that checks there is an active control plane machine set installed within the cluster.
func ItShouldHaveTheControlPlaneMachineSetReplicasUpdated ¶
ItShouldHaveTheControlPlaneMachineSetReplicasUpdated checks that the control plane machine set replicas are updated.
func ItShouldNotCauseARollout ¶
ItShouldNotCauseARollout checks that the control plane machine set doesn't cause a rollout.
func ItShouldNotOnDeleteReplaceTheOutdatedMachine ¶
ItShouldNotOnDeleteReplaceTheOutdatedMachine checks that the control plane machine set does not replace the outdated machine in the given index when the update strategy is OnDelete.
func ItShouldOnDeleteReplaceTheOutDatedMachineWhenDeleted ¶
func ItShouldOnDeleteReplaceTheOutDatedMachineWhenDeleted(testFramework framework.Framework, index int)
ItShouldOnDeleteReplaceTheOutDatedMachineWhenDeleted checks that the control plane machine set replaces the outdated machine in the given index when the update strategy is OnDelete and the outdated machine is deleted.
func ItShouldPerformARollingUpdate ¶
func ItShouldPerformARollingUpdate(opts *RollingUpdatePeriodicTestOptions)
ItShouldPerformARollingUpdate checks that the control plane machine set performs a rolling update in the manner desired.
func ItShouldPerformControlPlaneMachineSetRegeneration ¶
func ItShouldPerformControlPlaneMachineSetRegeneration(opts *ControlPlaneMachineSetRegenerationTestOptions, gomegaArgs ...interface{})
ItShouldPerformControlPlaneMachineSetRegeneration checks that an inactive control plane machine set is regenerated if the reference machine spec changes.
func ItShouldRollingUpdateReplaceTheOutdatedMachine ¶
ItShouldRollingUpdateReplaceTheOutdatedMachine checks that the control plane machine set replaces, via a rolling update, the outdated machine in the given index.
func ItShouldUninstallTheControlPlaneMachineSet ¶
ItShouldUninstallTheControlPlaneMachineSet checks that the control plane machine set is correctly uninstalled when a deletion is triggered, without triggering control plane machines changes.
func UpdateControlPlaneMachineProviderSpec ¶
func UpdateControlPlaneMachineProviderSpec(testFramework framework.Framework, index int, updatedProviderSpec machinev1beta1.ProviderSpec, gomegaArgs ...interface{})
UpdateControlPlaneMachineProviderSpec updates the provider spec of the control plane machine in the given index to match the provider spec given.
func UpdateControlPlaneMachineSetProviderSpec ¶
func UpdateControlPlaneMachineSetProviderSpec(testFramework framework.Framework, updatedProviderSpec machinev1beta1.ProviderSpec, gomegaArgs ...interface{})
UpdateControlPlaneMachineSetProviderSpec updates the provider spec of the control plane machine set to match the provider spec given.
func UpdateDefaultedValueFromControlPlaneMachineSetProviderConfig ¶
func UpdateDefaultedValueFromControlPlaneMachineSetProviderConfig(testFramework framework.Framework, gomegaArgs ...interface{}) machinev1beta1.ProviderSpec
UpdateDefaultedValueFromControlPlaneMachineSetProviderConfig updates a defaulted field value from the Control Plane Machine Set's provider config to test defaulting on such value.
func WaitForControlPlaneMachineSetDesiredReplicas ¶
func WaitForControlPlaneMachineSetDesiredReplicas(ctx context.Context, cpms *machinev1.ControlPlaneMachineSet) bool
WaitForControlPlaneMachineSetDesiredReplicas waits for the control plane machine set to have the desired number of replicas. It first waits for the updated replicas to equal the desired number, and then waits for the final replica count to equal the desired number.
Types ¶
type ControlPlaneMachineSetRegenerationTestOptions ¶
type ControlPlaneMachineSetRegenerationTestOptions struct { TestFramework framework.Framework OriginalProviderSpec machinev1beta1.ProviderSpec UpdatedProviderSpec machinev1beta1.ProviderSpec UID types.UID Index int }
ControlPlaneMachineSetRegenerationTestOptions allow test cases to be configured.