-
Notifications
You must be signed in to change notification settings - Fork 91
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
WIP: E2E test case for Kmesh L4 authorization #641
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
/test |
@YaoZengzeng: No presubmit jobs available for kmesh-net/kmesh@main In response to this:
Instructions 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/test-infra repository. |
/retest |
if len(apps.ServiceWithWaypointAtServiceGranularity) == 0 { | ||
t.Fatal(fmt.Errorf("need at least 1 instance of apps.ServiceWithWaypointAtServiceGranularity")) | ||
} | ||
src := apps.ServiceWithWaypointAtServiceGranularity[0] |
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.
why do you choose this special workload as a src 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.
There is no specific choice, any workload managed by Kmesh is OK.
|
||
addresses := clients.Addresses() | ||
if len(addresses) < 2 { | ||
t.Fatal(fmt.Errorf("need at least 2 clients")) |
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.
? why require at least 2 addresses
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.
One for allow
and one for deny
.
test/e2e/baseline_test.go
Outdated
check.ErrorContains("EOF"), // TCP envoy | ||
check.ErrorContains("read: connection reset by peer"), // TCP Kmesh | ||
check.NoErrorAndStatus(http.StatusForbidden), // HTTP | ||
check.NoErrorAndStatus(http.StatusServiceUnavailable), // HTTP client, TCP server |
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.
This is too wide, for tcp authz, can we only check reset?
selector: | ||
matchLabels: | ||
app: "{{.Destination}}" | ||
`+tc.spec+` |
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 hacky way, would prefer using fmt.Sprintf or golang template
authz offloading is disabled by default, the only way to enable it is |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
22a3fb4
to
88e54bf
Compare
/retest |
/test all |
@hzxuzhonghu: No presubmit jobs available for kmesh-net/kmesh@main In response to this:
Instructions 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/test-infra repository. |
60d92b8
to
0f86845
Compare
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
0f86845
to
b4775df
Compare
/test all |
@YaoZengzeng: No presubmit jobs available for kmesh-net/kmesh@main In response to this:
Instructions 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/test-infra repository. |
Signed-off-by: YaoZengzeng <[email protected]>
93b7fff
to
335cb2a
Compare
What type of PR is this?
/kind enhancement
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #492
Special notes for your reviewer:
Does this PR introduce a user-facing change?: