-
Notifications
You must be signed in to change notification settings - Fork 4.8k
[MON-4455] add EndpointSlices e2e test #30611
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
base: main
Are you sure you want to change the base?
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Tai-RedHat The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Scheduling required tests: |
|
@Tai-RedHat: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: f7237d0
|
machine424
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.
Thanks, I have some prepositions
| }) | ||
|
|
||
| g.It("should use endpoint slices for service discovery", func() { | ||
| configContents, err := helper.GetURLWithToken(helper.MustJoinUrlPath(prometheusURL, "/api/v1/status/config"), bearerToken) |
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.
how about using /api/v1/targets instead?
as used in
origin/test/extended/prometheus/prometheus.go
Line 109 in d8e7107
| contents, err := helper.GetURLWithToken(helper.MustJoinUrlPath(prometheusURL, "api/v1/targets"), bearerToken) |
we can then check whether __meta_kubernetes_endpoints_name (https://prometheus.io/docs/prometheus/latest/configuration/configuration/#endpoints) is part of data.activeTargets[*].discoveredLabels
for unmarshalling there is
origin/test/extended/prometheus/prometheus.go
Line 936 in d8e7107
| type prometheusTargets struct { |
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.
(we can "export" that promTargets function if needed)
| } | ||
| if len(jobsUsingEndpoints) > 0 { | ||
| formattedList := "\n - " + strings.Join(jobsUsingEndpoints, "\n - ") | ||
| // TODO(MON-4439): This should be a hard failure once all components have migrated. |
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.
maybe we can hardcode the targets to exclude somewhere and skip the check for them.
And of course have a ticket for them to migrate them later.
| } | ||
| }) | ||
|
|
||
| g.It("should use endpoint slices for service discovery", 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.
| g.It("should use endpoint slices for service discovery", func() { | |
| g.It("should only discover targets via endpointslice", func() { |
link to: https://issues.redhat.com/browse/MON-4439
local test result: