-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 tests for sidecar containers #1331
add tests for sidecar containers #1331
Conversation
8c36a6f
to
e17e33c
Compare
/retest |
There are a lot of unrelated changes, can you split changes for:
I know that there is dependency, however the first two can be merged immediately without much review, while the last one will take some time to review. |
ok, Let me split the changes |
e17e33c
to
7de8030
Compare
/test pull-metrics-server-test-e2e-ha |
/unhold |
I have splited the changes. |
I'm busy with other work. @dgrisonnet can you take a look? |
/assign @serathius @dgrisonnet |
test/e2e_test.go
Outdated
return nil | ||
} | ||
if podName == initSidecarContainersPodName { |
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 think you can simply iterate both collections instead of checking for specific pod name. All init containers must be Ready=true
if they run to completion yet and if they are sidecars they will follow the same logic as a regular containers
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.
thanks, I have updated it.
could you please take a look again?
/retest |
test/e2e_test.go
Outdated
@@ -108,6 +120,8 @@ var _ = Describe("MetricsServer", func() { | |||
panic(err) | |||
} | |||
|
|||
needTestSideCarsContainers = getSidecarFeature(client) |
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.
two naming suggestions here:
getSidecarFeature
should be renamed tohasSidecarFeature
orhasSidecarFeatureEnabled
since it returns a bool and not the actual feature objectneedTestSideCarsContainers
could be renamed totestSideCarsContainers
938e2bb
to
bea4bd6
Compare
/test pull-metrics-server-test-e2e-ha |
1 similar comment
/test pull-metrics-server-test-e2e-ha |
/retest |
1 similar comment
/retest |
/test pull-metrics-server-test-e2e-ha |
bea4bd6
to
93e6428
Compare
/hold |
131e53f
to
3440e36
Compare
test/e2e_test.go
Outdated
msPods := mustGetMetricsServerPods(client) | ||
for _, pod := range msPods { | ||
// access /apis/metrics.k8s.io/v1beta1/nodes for each pod to ensures that every MS instance get an requests so they expose all apiserver metrics. | ||
_, err := proxyRequestToPod(restConfig, pod.Namespace, pod.Name, "https", 10250, "/apis/metrics.k8s.io/v1beta1/nodes") | ||
Expect(err).NotTo(HaveOccurred(), "Failed to get Metrics Server /apis/metrics.k8s.io/v1beta1/nodes endpoint") | ||
} |
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 feel like this should go in a separate PR since it seems unrelated to the sidecar test
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, let me rollback the change
3440e36
to
041410e
Compare
/cc @dgrisonnet |
/unhold |
18933d4
to
eace528
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: serathius, yangjunmyfm192085 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 |
What this PR does / why we need it:
Add tests for new sidecars feature in kubernetes version 1.28
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 #1329