-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Test that new single replica topology API is taken into account #25812
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
Test that new single replica topology API is taken into account #25812
Conversation
c69f27d to
fba0e91
Compare
fba0e91 to
13f42a9
Compare
|
Thanks for the review, I've refactored the test -
Caveats
|
13f42a9 to
e362db3
Compare
| } | ||
| } | ||
|
|
||
| func isAllowedToFail(deployment appsv1.Deployment) 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.
A comment explaining these special cases would be useful for future reference
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.
Sure. Will add one
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.
Added in 395d469
| func getNamespaceDeployments(f *e2e.Framework, namespace corev1.Namespace) []appsv1.Deployment { | ||
| list, err := f.ClientSet.AppsV1().Deployments(namespace.Name).List(context.Background(), metav1.ListOptions{}) | ||
| Expect(err).NotTo(HaveOccurred()) | ||
|
|
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.
| return list.Items |
You're not doing any filtering 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.
Right, no filtering. The loop looks ridiculous because it's leftover after some modifications I did that made it obsolete. Will fix. Thanks
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.
Fixed in 0debdeb
| } else { | ||
| if replicas == 1 { | ||
| t := GinkgoT() | ||
| t.Logf("Deployment %s in namespace %s has one replica, consider taking it off the topology allow-list", |
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.
Who are we really expecting will react to this message?
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 intended mostly for me. We slowly want to remove operators from that list until it's empty, and it'll be helpful for me to see that message in the logs. It'll be removed once we finally get rid of this list
0debdeb to
1fddbdf
Compare
1fddbdf to
0debdeb
Compare
0debdeb to
41f81c7
Compare
| var _ = Describe("[sig-arch] Cluster topology single node tests", func() { | ||
| f := e2e.NewDefaultFramework("single-node") | ||
|
|
||
| It("Verify that all OpenShift namespaces deployments take control plane topology into account", func() { |
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.
Verify that OpenShift components deploy one replica in single node mode
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.
what is "all" ?
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.
what is "all" ?
All deployments defined inside openshift-* namesapces
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.
Re-phrased to "Verify that OpenShift components deploy one replica in SingleReplica topology mode" since it's not called single-node in the API topology enum
41f81c7 to
7d189ce
Compare
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/test e2e-aws-fips |
7d189ce to
045853f
Compare
simonpasquier
left a comment
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.
What about statefulsets? For OpenShift monitoring, we deploy statefulsets for Prometheus, Alertmanager and Thanos ruler (optional).
Right, considered testing those and forgot about that. EDIT: I think it's best if I add statefulsets in a future PR, I prefer that this gets merged first. |
|
/retest |
|
/assign @mfojtik Please approve |
|
/lgtm |
|
/approve @smarterclayton isnt there smarter way to "tag" these tests as single node and only run them in single node job? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mfojtik, omertuc, romfreiman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Why is the merge blocked:
What can I do about this? |
|
/test e2e-gcp-builds |
|
/test e2e-gcp-csi |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Tests that deployments have a single replica when openshift/enhancements#555 control plane topology is set to SingleReplica.
This enhancement is yet to be merged as well as the relevant behavior from the various operators, so this PR is in draft mode until then.