-
Notifications
You must be signed in to change notification settings - Fork 772
[tmpnet] Enable externally accessible URIs for kube-hosted nodes #4016
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: tmpnet-configmap
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR replaces port-forwarding with an externally accessible URI approach for kube-hosted nodes in order to improve load testing performance. Key changes include refactoring functions from GetLocalURI to GetAccessibleURI (and staking address equivalents), adding new logic to create Kubernetes Service and Ingress resources, and updating tests to use the new accessible URI methods.
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/fixture/tmpnet/utils.go | Updated error handling in CheckNodeHealth and simplified Node URI retrieval |
tests/fixture/tmpnet/start_kind_cluster.go | Added functions to deploy and verify the nginx ingress controller via Helm |
tests/fixture/tmpnet/process_runtime.go | Replaced GetLocalURI with GetAccessibleURI and updated staking address method |
tests/fixture/tmpnet/node.go | Updated Node interface methods to use the accessible URI versions |
tests/fixture/tmpnet/network.go | Updated network URI retrieval to use GetAccessibleURI |
tests/fixture/tmpnet/kube_runtime.go | Refactored URI retrieval for nodes to support external access and added Service/Ingress |
tests/fixture/tmpnet/flags/kube_runtime.go | Introduced new flag for base accessible URI configuration |
tests/e2e/* | Updated tests to use GetAccessibleURI (and staking address) throughout |
scripts/kind-with-registry.sh | Added a new script to set up kind with a local registry |
flake.nix | Removed kind-with-registry derivation and updated PATH configuration |
3814de2
to
30501bc
Compare
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.
Ran this locally with the load test passing.
I tried using this against the remote cluster with no success (this is expected). However, I believe you mentioned that this PR should refuse deployment to a context other than kind-kind
. Do you think we should add the refuse logic to this PR?
I meant to say that the test should only target kind-kind, not that tmpnet should refuse to deploy to a context other than kind-kind. Was the failure something like |
@maru-ava I'm getting the following error:
Going back to the original question, logging a warning would be great here. |
30501bc
to
c2453bb
Compare
Rebased |
0d49b43
to
407219d
Compare
I added more checks, but when I was testing this, I realized that our test cluster actually has an ingress controller so the checks didn't actually help.
Edit: Updated to source the ingress configuration from a configmap in the cluster. That way it can be zero-config for the end-user. |
30e1313
to
6a0c887
Compare
8869e8a
to
fec55a8
Compare
Dropped basicauth protection - the guid and node id should be sufficient. |
2a0ca73
to
51ac8dc
Compare
a26aa01
to
0db8da1
Compare
Previously, access from outside of a kube cluster was enabled by port-forwarding through the kube API. This approach turned out incompatible with load testing because it greatly limited the rate at which transactions could be sent. The port-forwarding is replaced with nginx+ingress to ensure minimum overhead when running outside of a kube cluster.
0db8da1
to
e2231cd
Compare
Why this should be merged
Previously, access from outside of a kube cluster was enabled by port-forwarding through the kube API. This approach turned out incompatible with load testing because it greatly limited the rate at which transactions could be sent.
The port-forwarding is replaced with nginx+ingress to ensure minimum overhead when running outside of a kube cluster.
How this works
How this was tested
CI
Need to be documented in RELEASES.md?
N/A
TODO