-
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
🏃[e2e] clusterctl e2e discovery #2820
🏃[e2e] clusterctl e2e discovery #2820
Conversation
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.
/approve
/assign @sedefsavas
/milestone v0.3.4
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini, vincepri 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 |
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.
Minor comments, otherwise LGTM.
test/framework/controllers.go
Outdated
|
||
// WaitForDeploymentsAvailable waits until the Deployment has status.Available = True, that signals that | ||
// all the desired replicas are in place. | ||
func WaitForDeploymentsAvailable(ctx context.Context, input WaitForDeploymentsAvailableInput, intervals ...interface{}) { |
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.
nit. We can combine this with framework/workload_cluster.go
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.
I moved to framework/management_cluster.go which seems more appropriate, but the result is the same (no more controller.go file)
} | ||
|
||
// GetKubeadmControlPlaneByCluster returns the KubeadmControlPlane objects for a cluster. | ||
// Important! this method relies on labels that are created by the CAPI controllers during the first reconciliation, so |
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 this rely on the owner ref, instead of labels?
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.
AFAIK ownerRef can't be used as a filter option for List.
Additionally, also ownerRef are set by CPAI controller during first reconciliation, so the same note will apply no matter of the change
9418e1f
to
bbf11a9
Compare
@sedefsavas thanks for the feedback. comments addressed/answer provided |
/lgtm |
} | ||
return false | ||
|
||
}, intervals...).Should(BeTrue(), "Deployment %s/%s failed to get status.Available = True condition") |
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 have been a fmt.Sprintf("Deployment %s/%s failed to get status.Available = True condition", input.Deployment.GetNamespace(), input.Deployment.GetName())
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.
@wfernandes good catch!
fixed by #2864
What this PR does / why we need it:
This PR extends the e2e framework by adding the possibility to discover Cluster API objects existing in a management cluster.
This feature allows to:
The PR also includes a utility for waiting for a controller deployment to get ready
Which issue(s) this PR fixes:
xref #2753
xref #2637
xref #2636
/assign @vincepri
/assign @sedefsavas
/cc @wfernandes
/cc @gab-satchi