generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 277
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
[kueue] Wait for webhooks setup before ready. #1674
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,18 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
kubeadmConfigPatches: | ||
- | | ||
kind: ClusterConfiguration | ||
apiVersion: kubeadm.k8s.io/v1beta3 | ||
scheduler: | ||
extraArgs: | ||
v: "2" | ||
controllerManager: | ||
extraArgs: | ||
v: "2" | ||
apiServer: | ||
extraArgs: | ||
enable-aggregator-routing: "true" | ||
v: "5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,11 +65,19 @@ func CreateVisibilityClient(user string) visibilityv1alpha1.VisibilityV1alpha1In | |
return visibilityClient | ||
} | ||
|
||
func KueueReadyForTesting(ctx context.Context, client client.Client) { | ||
func KueueReadyForTesting(ctx context.Context, c client.Client) { | ||
// To verify that webhooks are ready, let's create a simple resourceflavor | ||
resourceKueue := utiltesting.MakeResourceFlavor("default").Obj() | ||
gomega.Eventually(func() error { | ||
return client.Create(context.Background(), resourceKueue) | ||
}, StartUpTimeout, Interval).Should(gomega.Succeed()) | ||
ExpectResourceFlavorToBeDeleted(ctx, client, resourceKueue, true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why change this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the reporting is hard to follow with that, in case of multikueue you don't know which of the clusters is not ready. |
||
resourceKueue := utiltesting.MakeResourceFlavor("e2e-prepare").Obj() | ||
gomega.EventuallyWithOffset(1, func() error { | ||
return c.Create(ctx, resourceKueue) | ||
}, StartUpTimeout, Interval).Should(gomega.Succeed(), "Cannot create the flavor") | ||
|
||
gomega.EventuallyWithOffset(1, func() error { | ||
oldRf := &kueue.ResourceFlavor{} | ||
err := c.Get(ctx, client.ObjectKeyFromObject(resourceKueue), oldRf) | ||
if err != nil { | ||
return err | ||
} | ||
return c.Delete(ctx, oldRf) | ||
}, LongTimeout, Interval).Should(utiltesting.BeNotFoundError(), "Cannot delete the flavor") | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 delete this function if we are waiting for the "webooks setup before ready"?
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.
no, this is running in the test binary
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.
but should not the test binary wait until Kueue is healthy / ready, rather than trying to periodically create the items? If we still periodically need to create items I don't seem much gain of delaying the healthy status.
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.
It's just another way of checking the same thing.
I theory you can check if all the kueue-controller-manager pods are ready instead.
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 see, but this involves creating / deleting objects, something which users may not want to do in prod. I think it is better if e2e tests correspond better to production use. Also, the creation / deletion takes more time some may cover some user issues. If we go with this approach I would suggest to wait as for ready deployment, this can be done as here: