-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 Support MachinePools without MachinePoolMachines in clusterctl upgrade test #10498
Conversation
/test pull-cluster-api-e2e-full-main |
@willie-yao: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test pull-cluster-api-e2e-main |
test/e2e/clusterctl_upgrade.go
Outdated
@@ -127,6 +128,8 @@ type ClusterctlUpgradeSpecInput struct { | |||
// If not set, the test will upgrade once to the v1beta1 contract. | |||
// For some examples see clusterctl_upgrade_test.go | |||
Upgrades []ClusterctlUpgradeSpecInputUpgrade | |||
|
|||
SkipMachinePoolMachines bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a godoc comment that this is used for providers which don't support machine pool machines (don't remember the exact wording)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way this could be detected automatically? Maybe with the MachinePool's status. infrastructureMachineKind
like the MachinePool controller does?
cluster-api/exp/internal/controllers/machinepool_controller_phases.go
Lines 335 to 337 in 14f145e
if err := util.UnstructuredUnmarshalField(infraMachinePool, &infraMachineKind, "status", "infrastructureMachineKind"); err != nil { | |
if errors.Is(err, util.ErrUnstructuredFieldNotFound) { | |
log.V(4).Info("MachinePool Machines not supported, no infraMachineKind found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup this makes sense. Made this change in 7960aff
test/e2e/clusterctl_upgrade.go
Outdated
expectedMachineCount := *controlPlaneMachineCount | ||
if !skipMachinePoolMachines { | ||
expectedMachineCount += expectedWorkerCount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have to diferentiate between machinepool workers and machinedeployment workers here?
Isn't this something like:
expectedMachineCount := *controlPlaneMachineCount | |
if !skipMachinePoolMachines { | |
expectedMachineCount += expectedWorkerCount | |
expectedMachineCount := *controlPlaneMachineCount + expectedMachineDeploymentWorkerCount | |
if !skipMachinePoolMachines { | |
expectedMachineCount += expectedMachinePoolWorkerCount |
/test pull-cluster-api-e2e-main (I"ll take a look once tests are green and Christian is happy :)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtmz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 9a6610523c71a46a04fbceb0e707095a8d0f187f
|
/test pull-cluster-api-e2e-main |
/retest |
3d05916
to
cdbe9df
Compare
/test pull-cluster-api-e2e-full-main |
@willie-yao: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test pull-cluster-api-e2e-main |
Thx, last nit from my side /assign @chrischdi |
Thx! /lgtm /assign @chrischdi |
LGTM label has been added. Git tree hash: e263e680085cf64fc696b325bf90d12c9f0c6bf2
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrischdi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Had to create another fix in #10584 due to an issue with the controlplane machine count previously being hard-coded to 1. |
What this PR does / why we need it:
This PR adds support for MachinePools without MachinePoolMachines in the clusterctl upgrade test. It does so by waiting for the correct number of ready replicas rather than counting Machines by listing them from the management cluster.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #10134
/area testing