-
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
⚠️ add docker machine pool and e2e tests for machine pool #3506
Conversation
/retest |
@fabriziopandini what would you think about me adding docker infra implementation of machine pool? |
43aff40
to
2993308
Compare
Sorry for lagging in the response. |
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.
First pass. I'm really happy to see this happening!
/cc @srm09
} | ||
|
||
// ApplyClusterTemplateAndWait gets a cluster template using clusterctl, and waits for the cluster to be ready. | ||
// Important! this method assumes the cluster uses a KubeadmControlPlane and MachineDeployments. | ||
func ApplyClusterTemplateAndWait(ctx context.Context, input ApplyClusterTemplateAndWaitInput) (*clusterv1.Cluster, *controlplanev1.KubeadmControlPlane, []*clusterv1.MachineDeployment) { | ||
func ApplyClusterTemplateAndWait(ctx context.Context, input ApplyClusterTemplateAndWaitInput) *ApplyClusterTemplateAndWaitResult { |
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.
This is a breaking change for all the consumers of the test framework, so we should document an action required in the release note or wait for v1alpha4
@vincepri ^^
@fabriziopandini: GitHub didn't allow me to request PR reviews from the following users: srm09. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
Thank you for the feedback, @fabriziopandini. Sorry for the slow response. I think I missed your first message while I was on vacation. I'm pretty close on the machine creation / deletion within the |
ad67bd5
to
b4bcdeb
Compare
This comment has been minimized.
This comment has been minimized.
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.
@devigned this is a big jump forward!
I think that we can make the reconcile loop more robust if we start from a list of existing containers and then adapt the current real state to desired.
Also, it will be great if we can find a way to implement once the bits that are identical from MachinePool and Machine (e.g. getBootstrapToken, SetProviderID), but at the same time I don't want to expand too much the scope of this PR, so I leave this evaluation to you.
test/infrastructure/docker/exp/api/v1alpha3/dockermachinepool_types.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
4238b16
to
46c6328
Compare
EDIT:
This is a breaking change, needs to be called out on release notes with |
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.
@devigned
I finally gave a look at the controller (sorry for lagging behind a little bit in reviewing this PR)
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
return np.Refresh() |
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.
should this goes before the loop reconciling machines, so the new instance are reconciled immediately?
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.
Refresh is called when initializing the node pool. If the node pool were to stick around for a while, this change would probably be needed. At this point, a node pool is created in the reconcile loop and is acting on only that one docker machine pool. I don't think that much will change between construction and use of the node pool, so this probably won't have much effect.
test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go
Outdated
Show resolved
Hide resolved
1a862a7
to
59e42ec
Compare
/test pull-cluster-api-e2e-full |
/test pull-cluster-api-e2e-full |
@devigned: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
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.
@devigned great work!
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
Really appreciate your insightful reviews, @fabriziopandini and @CecileRobertMichon! Thank you. |
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
🙌
/milestone v0.3.10 |
What this PR does / why we need it:
Currently, the test framework is unaware of machine pools and will not wait for those nodes to be ready. This PR is to enhance the test framework to include machine pool functionality.
This PR adds a
DockerMachinePool
implementation. As part of adding that implementation, the PR also expands upon the e2e tests to validate theDockerMachinePool
.